"ionic run ios" - doesn't work

if I go manually without ionic cli I’m able to deploy directly to device:

$ cordova clean 
$ ionic run ios --device
$ ios-deploy --debug --bundle platforms/ios/build/device/MyApp.app

if I go with ionic it doesn’t work:

cordova clean && ionic run ios --device

Ionic info:

Cordova CLI: 6.1.1
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.7-201605211713
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
ios-deploy version: 1.8.6 
ios-sim version: 5.0.6 
OS: Mac OS X El Capitan
Node Version: v5.7.0
Xcode version: Xcode 7.3.1 Build version 7D1014

I think ionic builds as default for the emulator.
Try:
ionic run ios --device
which works for me :slight_smile:

Same goes for the build:
ionic build ios --device
which adds the name of my device by default if it’s already in the provisioning profile.

Tried but it quits right after build.

I’ve ended up with this alias and it works 100% all time.

vim ~/.bash_profile

alias deployIOS="cordova clean && ionic run ios --device && sleep 15 && ios-deploy --debug --bundle platforms/ios/build/device/MyApp.app"

Strange… well you could also replace run by build
alias deployIOS="cordova clean && ionic build ios --device && .. because run does a build an then a deploy internally.

Another strange behavior I experienced sometimes was that ionic run ios --device quits after the build without deploying to the phone and when I run it a second time it builds and deploys…:triumph:

Ok what I initially did are the following steps which work for me, although I do not like the fact that I have to register each new phone at the Provisioning Profile:

  1. Connect Phone to my Mac and Sync Xcode with my Developer Account so that the name of my phone appears in the Provisioning Profile Section.
  2. Select the phone and download the profile.
  3. Copy the Provisioning Profiles (found on stackoverflow): sudo cp -r ~/Library/MobileDevice/ /Library/MobileDevice/(but I do not know if it is really necessary. I am still learning how this Apple process works, maybe u know more…)
  4. Then ionic run ios --device

If you ask me iOS is necessary evil I need to support. With Android things always running smoothly but with iOS only headaches :head_bandage:

I’m relatively new in Apple world so same as you - learning in progress :slight_smile:

And yes I will replace run with build - thx for suggestion.

Hi all, I was also struggling with all that signing and deploying stuff for IOS, copying isn’t needed, your shell script works well for me :slight_smile: ths…

Pitt

I get a verifyingApplication error in AMDeviceSecureInstallApplication
code 253