SaH February 2016

ionic emulate ios - won't emulate and says no such file or directory

Ran add ios and build ios fine, but then I ran "ionic emulate ios" and it brought up the xcode emulator but with no app or button for my app (just safari, maps, etc.).

I then later ran ionic emulate ios --target="iPhone-5s" and got this error:

** BUILD SUCCEEDED **

An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159): Invalid device state An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159): Invalid device state

ENOENT: no such file or directory, stat '/Users/sh/Library/Logs/CoreSimulator/62773263-27DC-4E83-9C6A-ED2B73DC3F0A/system.log' Error code 1 for command: ios-sim with args: launch,/Users/sh/Desktop/shapp/platforms/ios/build/emulator/shapp.app,--devicetypeid,com.apple.CoreSimulator.SimDeviceType.iPhone-5s,--stderr,/Users/sh/Desktop/shapp/platforms/ios/cordova/console.log,--stdout,/Users/sh/Desktop/shapp/platforms/ios/cordova/console.log,--exit Error: /Users/sh/Desktop/shapp/platforms/ios/cordova/run: Command failed with exit code 2

SHs-iMac:shapp sh$ q -bash: q: command not found

Not sure what I did wrong as I added and built ios correctly.

It also worked correctly when pulled up in xcode although there are these warnings for both running with 5s and 6. I think it is an ionic issue not being able to emulate ios just not sure how to fix it?

Answers


Mati Tucci February 2016

Do this:

  1. Update ios-sim package: npm install ios-sim -g
  2. Update cordova: npm install -g cordova
  3. Remove iOS platform: cordova platform rm ios
  4. Add iOS platform: cordova platform rm ios

Post Status

Asked in February 2016
Viewed 2,518 times
Voted 12
Answered 1 times

Search




Leave an answer