Deploying to device (iOS)

Hello,

I followed the Deploying to device guide thoroughly and was able to successfully launch an app on my iOS device using XCode 8. However, at the end of the docs, you can see:

Now, go back to Xcode and hit that play button or run ionic cordova run ios --device from the command line to install and launch your app on your iOS device.

Launching with the play button in XCode 8 works fine, but running ionic cordova run ios --device throws a signing error:

No profiles for "com.my.app". Xcode couldn't find a provisioning profile matching "com.my.app".

It seems that ios-deploy is trying to look for a provisioning profile to sign my app with, though I have already assigned the “personal team” profile to the generated XCode project, as explained in the docs.

So, either my setup of ios-deploy is wrong, or the docs don’t mention that ios-deploy won’t work with locally XCode managed profiles but only with a valid Apple developer account (which is mentioned as second requirement for the ios-deploy Cordova plugin).

The reason why I need the command line to work is I am trying to debug the well-known “whitescreen of death” but can’t launch on iOS using -l -c (livereload and consolelogs options)… so I’m stuck. Additionally, every time I need to reload the app on my device, I run sudo ionic cordova build ios, which updates the XCode project files but fails signing the app, then I need to go to XCode and relaunch manually… tedious task when you know there’s a livereload option that works amazingly on Android :stuck_out_tongue:

Thanks a lot for your help !

EDIT:

Cordova latest docs mention something about a build.json file where you can specify your team id for iOS signing, but according to a thread in this forum, Ionic changed the build process so a build.json file can’t be used anymore ?

EDIT 2:

Also tried ionic cordova run ios --device --provisioningProfile myProvisioningProfileId, where myProvisioningProfileId is the name of the provisioning profile file created by Xcode in ~/Library/MobileDevice/Provisioning\ Profiles/ as pointed out by Cordova docs.

1 Like