离子模拟ios - 不会模仿,并且不会说这样的文件或目录

时间:2016-02-08 20:11:42

标签: ios iphone xcode cordova ionic-framework

跑出add iosbuild ios很好,但后来我跑了ionic emulate ios并启动了xcode模拟器,但我的应用没有应用或按钮(只是狩猎,地图等)。

然后我运行ionic emulate ios --target="iPhone-5s"并收到此错误:

  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

当我正确添加和构建ios时,不确定我做错了什么。

当在xcode中上拉时它也能正常工作,尽管这两个警告都在运行5s and 6。我认为这是一个离题问题,无法模仿ios,只是不确定如何解决它?

1 个答案:

答案 0 :(得分:1)

这样做:

  1. 更新ios-sim包:npm install ios-sim -g
  2. 更新cordova:npm install -g cordova
  3. 删除iOS平台:ionic platform rm ios
  4. 添加iOS平台:ionic platform add ios