Reputation: 929
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?
Upvotes: 2
Views: 3855
Reputation: 2976
Do this:
ios-sim
package: npm install ios-sim -g
npm install -g cordova
ionic platform rm ios
ionic platform add ios
Upvotes: 1