Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install cordova(phonegap) ios app to device via cli and not via xcode

I am trying to create a simple project with last phonegap version:

$ phonegap create my-project
$ phonegap build ios
$ phonegap install ios

All works perfectly and I see emulator with my simple application.

But I can't find documentation on how to run my application on device(iphone, for example) and not on a simulator.

All documentation by cordova / phonegap based on examples with cordova's template for xcode. But last cordova's version don't have template for xcode and all that I need - cli, if I understand correctly?

I already registered as IOS developer and I have a valid iPhone development certificate. When I connect my device - I can see it in xcode and I can run native application on my device. But only via xcode.

I will be grateful to any advice.

like image 565
Igor Benikov Avatar asked Nov 01 '22 07:11

Igor Benikov


1 Answers

If the cordova app builds and runs on the simulator, try running cordova run ios --device

This worked for me, when before it was only hitting the simulator.

Alternatively, if that STILL doesn't work for you, when you run codova build ios, to just build the app, you could use itunes to sync the generated .app file in <project_folder>/platforms/ios/build/device/AppName.app

like image 130
mix3d Avatar answered Nov 09 '22 11:11

mix3d