Error when launching IOS emulator


#1

Hi,

I’m getting this error when launching IOS emulator:

Emulating app on platform ios
Running command: /Users/myself/Sites/tests/ionic/todo/platforms/ios/cordova/run --emulator
Cordova needs ios-sim version 1.7 or greater, you have version .
Error: /Users/myself/Sites/tests/ionic/todo/platforms/ios/cordova/run: Command failed with exit code 1
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
ERROR: Unable to emulate app on platform ios. Please see console for more info.
Exiting.

ios-sim is installed and I have version 1.9 running. So not sure why I’m getting this error.
If anyone can help me out here?

thanks!


#2

Does the emulator event start up?
How did you install ios-sim? Did you run sudo npm install -g ios-sim?


#3

The emulator doesn’t start up.
Yep, did the installation sudo npm install -g ios-sim


#4

This line:

Cordova needs ios-sim version 1.7 or greater, you have version .

seems to imply that you don’t have the correct version of ios-sim. What does running ios-sim --version print out?


#5

OP already stated this

Do you have xcodes Command line tools installed?


#6

This is strange, when I run ios-sim --version I get this Killed 9


#7

Yep, XCode Command Line installed


#8

It appears that something is forcefully killing your ios simulator. Do you have any related / auxillary programs running in the background like a unit test process or some custom build process that could be causing this?


#9

Very good question, the only thing I can come up is a watch task for my SASS files.
I could reinstall OS X Command Line Tools but it seems to be unavailable from the update server.

I’m running OS X Mavericks, maybe there’s something in this version that’s blocking the simulator?


#10

Hmm strange, now it seems to work. I created a new blank project with some custom CSS and HTML, added ios platform => build => emulate and it seems to be working.

Maybe there was a small bug when creating my other project?


#11

Hmm, possibly. Cordova’s commands can be problematic sometimes, especially if you update the project to a new version (say 3.4 to 3.5).

Glad to hear that it’s all resolved now though!