Kit Sunde
Kit Sunde

Reputation: 37105

Why does cordova run skip my iPhone?

I have my phone connected and I run:

cordova run --platform ios --target="iPhone-6s"

It builds just fine, finds my a phone and then skips it:

** BUILD SUCCEEDED **

** BUILD SUCCEEDED **

[....] Waiting up to 1 seconds for iOS device to be connected
[....] Found iPhone 6s 'Kit's iPhone' (acc7f2f68a88ed162782c740c37cc838fb1a4ff9) connected through USB.
[....] Waiting for iOS device to be connected
Skipping iPhone 6s 'Kit's iPhone' (acc7f2f68a88ed162782c740c37cc838fb1a4ff9).

Why is that, how can I make it work? It doesn't give anymore information even with --verbove.

Upvotes: 2

Views: 685

Answers (3)

michelepatrassi
michelepatrassi

Reputation: 2086

I run my app on iPhone successfully following these steps:

  • connect your iPhone via USB cable
  • run ionic cordova run ios -l --device. This is going to fail because the "app developer" (you!) is not authorized, but it will result to the app installed on your phone
  • on you phone, go to settings -> general -> device management. Tap on your profile and authorize yourself. This authorization is gonna stay until apps from the authorized developer will be installed
  • run again ionic cordova run ios -l --device and you should have your app running on your device with auto-reload.

Upvotes: 0

Astra Bear
Astra Bear

Reputation: 2738

I had the same problem. I tried a few things including --target, --device arguments but didn't help in my case. I opened XCode on the Cordova ios project file, then did build and run. It still failed but gave me a useful error message. In my case it was because I was targeting IOS 10 in the project but the phone was IOS 9. In short, use XCode to see what the real problem is.

Upvotes: 0

klaus
klaus

Reputation: 1836

I just faced the same problem.

You might want to leave out the --target parameter.

'Kit's iPhone' mismatches "iPhone-6s".

In my case, I provided the device ID, which for an unknown reason never matched and the device therefore had been skipped.

If you have more than one and thus ambiguous targets, my answer will probably not be sufficient.


Let me just mention the way I successfully ran the app on a device to help out folks googling for ionic:

ionic run ios --device

Upvotes: 4

Related Questions