I am getting the following error when I run ideviceinstaller/ideviceinfo commands:
No iOS device found, is it plugged in?
My iPhone is certainly plugged is and visible in lsusb.
Restart the usbmuxd service and your device will show up normally:
systemctl restart usbmuxd.service
Your iPhone will vibrate if it connected successfully.
there is a file 'lockdownd' and it might have 0700 permissions with the owner as root. You should try chmod 0705 lockdownd. restart was not necessary for me. You might also run ideviceinstaller/ideviceinfo as root or with sudo. You might not have a recent version or you might have multiple versions installed. There is an xcode version-ish and there is a brew.
UPDATE there are a lot of details missing here, however, I gt this error when I had installed libimodiledevices with brew and allowed or told brew to clean the other dynlinks. That disabled ideviceinfo etc because of a missing dynlib. For example flutter prepackages these tools and brew breaks it.
Related
I am trying to set up a react-native development environment. I would like to set up an iOS emulator (preferably an iPhone 10) to run my app on. I am using a Macbook Pro 2016 running on MacOS 10.14.3. I have installed my react-native app through the command create-react-native-app (running version 2.0.2). I also have installed XCode running version 10.2(10E125). When I scan the QR code that Expo generates and run it on my iPad or my Android device it works just fine, but when I try to load the iOS emulator by pressing i after expo start it returns the error
Trying to open the project in iOS simulator...
Simulator is installed but is identified as 'com.apple.CoreSimulator.SimulatorTrampoline'; don't know what that is.
Simulator not installed. Please visit https://developer.apple.com/xcode/download/ to download Xcode and the iOS simulator. If you already have the latest version of Xcode installed, you may have to run the command `sudo xcode-select -s /Applications/Xcode.app`
I have already tried running the command sudo xcode-select -s /Applications/Xcode.app
I have also tried running the command xcode-select -r
I have also confirmed that in my XCode->Preferences->Locations Command Line Tools is selected as "Xcode 10.2(10E125)"
None of these have worked.
I am expecting that after pressing i after expo start an iOS emulator loads up. Thank you.
-----EDIT-------
After some more research, I found out that running open -a Simulator and then running expo start loads the app on an emulator and works for my purposes. But still if I just run expo start without running open -a Simulator it still gives the same error. I want to ask if this is the best I am going to get?
You might be running an outdated version of Expo. I had this problem when I was download someone's old repo using Expo 27 when Expo 36 came out. After updating to the latest version, it works.
To update packages in your project, npm-check-updates comes in handy.
npm i -g npm-check-updates # installs ncu globally
ncu -u # updates all dependency versions in your local package.json
npm install # updates the packages in node_modules to match
Note: This will update all your dependencies to the latest version. If you don't want to do this, you can find the latest version of expo and change the version in package.json manually.
I ran into the exact same problem all of a sudden. Clicking "Run on iOS Simulator" within the Expo Developer Browser worked 2 days ago but did not work today. Your clue of using open -a Simulator helped me though. I went into Xcode and clicked the Xcode menu > Open Developer Tool > Simulator. This started the Simulator and then I was able to click "Run on iOS Simulator" within the Expo Developer Browser and it worked as expected. If you haven't had the fortune of "Run on iOS Simulator" working, I'm guessing you could just start a simulator, download Expo from the App Store and just use it from there. None of this answers the question as to why the error happens but at least gives a few workarounds for anyone else that might need. All that matters is you get the app running on the Simulator in the end!
I am currently working on automated testing of Qt-Applications on devices running iOS. So far I am able to install and run these Applications fine, but I am unable to read their output. As far as I understood, reading this issue, Qt uses the gdb server to deliver the output of std::out and std::err to the Qt Creator but I can not get my head around on how to use this information. Besides the bundle identifier, I am given the .ipa-file of the application only. I have access to the applications code but I must not change it.
I use the libmobiledevice libraries to handle all tasks like connection, installation and execution of and on the device.
To summarize: I want to read the debug output of a Qt-written application displayed on my console, like it would be in the "Application output" window of my Creator.
I found a way using the imobiledevice libraries. By calling Idevicedebug -u <uuid> run de.foo.app I was able to execute the application. The qDebug output was prompted to std::out.
As the app crashed when started with a locked screen, I had to check for the display being idle by examining the output of idevicediagnostics ioreg IOPower first.
Now, half a year later, I found a solution that worked both elegant and stable.
I installed the ios-deploy tool using node:
npm install -g ios-deploy
Using this, I was able to install the app and listen to it's output via:
ios-deploy --debug --bundle path/to/my.app
I recieved the full qDebug, std::out and std::err output perfectly fine.
To uninstall the app, I simply added the -9 or --uninstall_only option:
ios-deploy --debug --bundle path/to/my.app --uninstall_only
Using this solution the app could be started reliably, without crashing with a locked screen
I'm getting the error "Could not allocate a resource" when I try to run on any of my devices. I've seen this as a possible fix:
sudo rm -rf /var/db/lockdown/
I've tried that and restarted my machine a handful of times, but no luck. I also tried changing USB ports. I've reinstalled Xcode as well after uninstalling with AppCleaner.
In addition to the error, whenever I connect a device it asks me "Trust This Computer?"
This is occurring on an iPhone 5 and iPhone 6+ with lightning, as well as an iPad 3 with the old style connector.
[Updates]
I've now also reinstalled iTunes to no effect.
Also reset PRAM and SMC.
After you delete that folder, you need to recreate again and make proper permissions, because iTunes need rw rights to that folder:
sudo mkdir /var/db/lockdown
sudo chmod go+w /var/db/lockdown
without having iTunes open. Then everything should be fine.
Also keep in mind the same operation may be required for /private/var/db/lockdown [a mirror]
If you moved and old Mac to a new one, make sure /var/db/lockdown/SystemConfiguration.plist contains your mac actual UUID . Generally it is not recommended to delete a system folder, anyway, without really knowing what you do. ;) Actually I replicated your problem moving /var/db/lockdown to another location, starting iTunes, getting error. Then recreate etc.
I'm tryin' to debug my app on iOS simulator in my Mac.
I've followed all the instructions installing on my Mac:
sudo npm install -g vs-mda-remote
sudo npm install -g ios-sim
When I prompted
vs-mda-remote --buildDir Projects
(Projects is the folder where debug files will be droped), I see results in my PC by
http://<MAc_IP>:3000
With the following text
Remote build Express server open for business on port 3000
Ok, now I prompted
vs-mda-remote test
And I see an error with the following message
Failed to build app: CordovaError: Platform ios already added
I don't know what happen.
Ok, I found the problem. Maybe, I'm too eagier.
Instead of using one session in terminal app on mac, I used too many, so, when I prompted too many timesvs-mda-remote, obviously ios was already installed.
So, opening terminal at first time, and prompting
vs-mda-remote --buildDir Projects --allowsEmulate=true
Now, I can debug on iOS simulator from my PC to Mac.
While running the build agent, the correct command is:
vs-mda-remote --buildDir <server-build-directory> --allowsEmulate=true
Note the last "--allowsEmulate=true" part of the command.
*Taken from "Setting up the Remote Agent to Support Starting the iOS Simulator" section in the documentation.
Platform ios already installed
Received this error for running in device too, while running multiple instance in mac.
Quit Terminal and run single instance for vs-mda-remote to resolve this problem if you receive this error for running in Device.
I'm running test on an app using UIAutomation, but I need a way to uninstall the app in a device (iPhone, iPad, iPod) without using jailbreak.
Currently I´m using fruitstrap to upload the app to a cable connected device using the device UID.
Is there a way thru a command line (yes it MUST be command line) to delete the app from the device?
Use the fantastic mobiledevice tool!
mobiledevice repo on GitHub
It compiles in seconds and it let you interact with the connected iOS devices very easily.
Use ideviceinstaller
To install app: ideviceinstaller -i testApp.ipa
To uninstall app: If you don't know bundle id, first get bundle id
ideviceinstaller -l then
ideviceinstaller -U com.testPackage.testApp
New Kid on the block - ios-deploy MobileDevice was a good tool, however not being actively developed. ios-deploy works great.
Here is the command -
ios-deploy --id <device_id> --uninstall_only --bundle_id com.app.testapp
(ios-deploy is forked from fruitstrap only)
Via command line: uninstall [-i/--id device_id] -b/--bundle bundle.app
Removed the specified bundle identifier (eg com.foo.MyApp) from the specified device, or all attached devices if none are specified.
Used this repository
Note: works with SDK 6.1.3 but not with SDK 6.1.4
For those who still get here by google:
You can installe the ruby gem ios_app_installer (which is a "light" version of ios-deploy) and after installing it use the command
ios_app_installer -b <bundle id> -u
(The device may have to be connected via USB)