Chapter 4: Testing your app tutorial - No target specified for emulator. Deploying to iPhone-6 simulator

In chp4 of Testing Your App Tutorial , after running $ ionic emulate ios
I received the message below.

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

Can anyone tell me how to correct this issue?

Also, I was given the choice between two addresses. I tried localhost but couldnt get that displaying properly. I wanted to try the ip address but didnt know how to get out of localhost and get into the ip address. Any suggestions will be much appreciated.

  1. 192.168.1.3 (en0)
  2. localhost

Thx,
Mark

** BUILD SUCCEEDED **

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

2015-04-01 21:56:44.920 ios-sim[4766:507] stderrPath: /Users/marklovett/Ionic-Projects/todo/platforms/ios/cordova/console.log
2015-04-01 21:56:44.921 ios-sim[4766:507] stdoutPath: /Users/marklovett/Ionic-Projects/todo/platforms/ios/cordova/console.log
** RUN SUCCEEDED **
marks-mbp:todo marklovett$ angular.module(‘todo’, [‘ionic’])
-bash: syntax error near unexpected token `‘todo’,'
marks-mbp:todo marklovett$ ionic serve

Multiple addresses available.
Please select which address to use by entering its number from the list below:

  1. 192.168.1.3 (en0)
  2. localhost
    Std in before prompt
    Address Selection:

So this issue comes from the recent update to cordova.
Cordova changed up how they deploy to a device vs how they deploy to the simulator.

Just to be sure, please sure you have ios-sim installed and ios-deploy

$ sudo npm install -g ios-sim ios-deploy

Also, make sure you have the most recent version of xcode installed.

1 Like

I am facing similar issue with windows 8 and nexus 5 connected using debugging mode.

Getting the below error message when try to run android command.
image

Pls help

Hi @satish11nov, do you have google USB driver installed?

http://developer.android.com/sdk/win-usb.html

1 Like

Hey@ivanbtrujillo, installed drivers and working perfect. Thanks a lot.

Further,do i need to build and deploy everytime i do some changes in code? I have used --lab for local testing but it does not give the real app feel.

Hi! Nope build your app and execute it using livereload ( -l or --livereload)

Ionic build android
Ionic run android -l

When you make changes, your device updates in real time. It’s like ionic serve.

Hi @ivanbtrujillo I use an HTC device , I don’t understand how to livereload ? Can you pls provide some links as reference? Thanks!