When running the command
cordova emulate ios
I get an error as shown below. I really get rm: could not remove and permission denied errors, so I use sudo. I was able to run this without problems, and then after rebooting - although nothing has changed - this function does not work. After build succeeded - deploying to emulator I get this error
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/user/Library/Logs/CoreSimulator/8F3C9A0F-D432-49A4-84DA-D0480829884A/system.log' Error code 1 for command: ios-sim with args: launch,/Users/user/helloworld/platforms/ios/build/emulator/helloworld.app,--devicetypeid,com.apple.CoreSimulator.SimDeviceType.iPhone-4s,--stderr,/Users/user/helloworld/platforms/ios/cordova/console.log,--stdout,/Users/user/helloworld/platforms/ios/cordova/console.log,--exit Error: /Users/user/helloworld/platforms/ios/cordova/run: Command failed with exit code 2 at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:139:23) at emitTwo (events.js:87:13) at ChildProcess.emit (events.js:172:7) at maybeClose (internal/child_process.js:818:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
I reinstalled sudo npm install ios-sim -g and the same error. How can I run it correctly?
ios macos cordova-3
Jon
source share