iOS 'No target specified for emulator' after Cordova 4.3.0 Update

4,009 views
Skip to first unread message

Ben Wilson

unread,
Mar 6, 2015, 3:12:35 PM3/6/15
to phon...@googlegroups.com

Hello,

After updating from Cordova 4.2.0 to Cordova 4.3.0 I've found that the command:

cordova run ios

...always deploys to the emulator.

I can deploy to the test iPhone from Xcode no problem. The message is:

** BUILD SUCCEEDED **

No target specified for emulator. Deploying to iPhone-6 simulator


If I revert to Cordova 4.2.0 then it works fine. According to http://cordova.apache.org/ there's been some changes to ios-deploy so I was careful to update to ios-deploy 1.4.0.

Could do with some insight as its a pain to have to use Xcode in this way.

Thanks,

Ben.

Kerri Shotts

unread,
Mar 6, 2015, 3:48:30 PM3/6/15
to phon...@googlegroups.com
What happens if you:

cordova run ios --device

Same thing?

Ben Wilson

unread,
Mar 6, 2015, 4:25:09 PM3/6/15
to phon...@googlegroups.com

Wow thanks Kerry - that did the trick!

Feel pretty silly now after hours of fiddling. Clearly something has changed between 4.2.0 and 4.3.0. I guess you have to explicitly tell the cli rather than have it figure it out.

Thanks again

Ben.

aaron

unread,
Mar 6, 2015, 4:49:34 PM3/6/15
to phon...@googlegroups.com
tried that and it is still not working for me? Do I need to update the project to a newer format?

192:dcww aaronksaunders$ ionic run ios --device
Running command: /Users/aaronksaunders/WebstormProjects/dcww/hooks/after_prepare/010_add_platform_class.js /Users/aaronksaunders/WebstormProjects/dcww
add to body
class: platform-ios
Running command: /Users/aaronksaunders/WebstormProjects/dcww/hooks/after_prepare/020_remove_sass_from_platforms.js /Users/aaronksaunders/WebstormProjects/dcww
Running command: /Users/aaronksaunders/WebstormProjects/dcww/platforms/ios/cordova/run --device


ERROR running one
or more of the platforms: Error: /Users/aaronksaunders/WebstormProjects/dcww/platforms/ios/cordova/run: Command failed with exit code 2
You may not have the required environment or OS to run this project

Ben Wilson

unread,
Mar 6, 2015, 6:09:05 PM3/6/15
to phon...@googlegroups.com

Hi Aaron,

Here's what I did to update my project after getting the latest cordova and ionic installed:

cd [my projects directory]
cordova platform update ios
cordova platform update android
ionic lib update

(for ionic lib update I think you need bower installed: sudo npm install -g bower)

Then make sure ios-deploy at 1.4.0:

sudo npm install -g ios-deploy

It could also be due to your code signing setup on your project. In order to deploy to a device, even for development, you'll need to have configured a provisioning profile with a valid signing identity. I find the easiest way to configure this is to just go into Xcode and select them under Build Settings of your Target.

Shazron

unread,
Mar 6, 2015, 7:47:42 PM3/6/15
to phonegap
Sorry about this. This behavior changed during the port of scripts to
node.js. We are actively discussing what needs to be done here:
http://callback-dev.markmail.org/thread/zjgcmw234tcuqbd6
> --
> -- You received this message because you are subscribed to the Google
> Groups "phonegap" group.
> To post to this group, send email to phon...@googlegroups.com
> To unsubscribe from this group, send email to
> phonegap+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/phonegap?hl=en?hl=en
>
> For more info on PhoneGap or to download the code go to www.phonegap.com
> ---
> You received this message because you are subscribed to the Google Groups
> "phonegap" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to phonegap+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages