I work with the latest version of Cordova (4.3) on OS X, and I have 2 iPhones attached to my Macbook Pro. Whenever I want to test my application, I run the following command in the terminal:
cordova run ios --device
The script outputs the following output in the terminal:
** BUILD SUCCEEDED ** [....] Waiting up to 5 seconds for iOS device to be connected [....] Found iPhone 4S 'iPhone 4S' (0b2799xxxxx) connected through USB. [....] Found iPhone 4 (GSM) 'QA iPhone 4' (40daa94b6dc607595a570c0893ba54b185a85124) connected through USB. [....] Waiting for iOS device to be connected [....] Using iPhone 4S 'iPhone 4S' (0b27990xxxxxx) (0b2799xxxx). ------ Install phase ------ [ 0%] Found iPhone 4S 'iPhone 4S' (0b279904xxxxxxx) connected through USB, beginning install
And then he proceeds to install the application in ONE from the iPhone and opens the lldb prompt. The second iPhone remains dead and silent.
When I exit lldb (via 'exit', 'y'), the scripts show an error:
Quitting LLDB will kill one or more processes. Do you really want to proceed: [Y/n] y Error code 253 for command: ios-deploy with args: -d,-b,/Users/path_to_app/appname.app ERROR running one or more of the platforms: Error: /Users/path_to_app/platforms/ios/cordova/run: Command failed with exit code 2 You may not have the required environment or OS to run this project
I went through all the CLI documentation in Cordoba and Google, but I donβt see how I can deploy the application on a specific physical iPhone device (and not on an emulator!). On Android, I can use "rootova run android --target = 06af27413440e95f", where the long number is the device id in adb. How to do it for iPhone?
I tried the following to no avail:
cordova run ios --target='QA iPhone 4' cordova run ios --device='QA iPhone 4' cordova run ios --device --target='QA iPhone 4'
source share