Is there easier way to run on Ionic app on the device?

Currently, we can easily run the app on the simulator using Ionic run command. But some apps requires device features like camera etc which can only be tested on the device. In those scenarios how can I run the app on the device from using Ionic command line. Currently, I have to navigate to the iOS folder and then run through Xcode.

ionic run ios --device

I get this:

ios-deploy was not found. Please download, build and install version 1.2.0 or greater from into your path. Or ‘npm install -g ios-deploy’ using node.js:

Yes simply do what it says :smile:

sudo npm install -g ios-deploy
1 Like

Now, I get this:

2016-01-22 11:20:21.567 ios-deploy[93351:6887862] [ !! ] Error 0xe8008015: A valid provisioning profile for this executable was not found. AMDeviceSecureInstallApplication(0, device, url, options, install_callback, 0)
Error code 253 for command: ios-deploy with args: -d,-b,/Users/mohammadazam/documents/projects/MI/platforms/ios/build/device/

I can easily run the app using Xcode but when using the command you provided I get the above error.

Recently I have had to open the project in xcode and accept its offer to fix the provisioning profile for new projects. Then after that everything has been fine using ios-deploy via ionic cli.

Otherwise, sorry I am unable help you any further :disappointed:

Thanks! I fixed that problem by explicitly selecting a provisioning profile instead of it selecting Automatic. Now, I am looking into how to do live reloads when the app is running on the device?

Perhaps this :

Thanks yeah I read that! I was hoping that it was fixed by now! :smiley: