I am trying to run sample ionic app from “Getting started” web page, everything builds fine but I just am not able to run the command “sudo ionic emulate ios”.
I have tried all the solution from this forums i.e. creating emulate.sh file, giving permission, restarting. Nothing works
I have latest xcode from last week, what else I should do.
here is error :
** BUILD SUCCEEDED **
No target specified for emulator. Deploying to iPhone-6 simulator
An error was encountered processing the command (code=146):
Invalid device state
ENOENT, no such file or directory '/Users//Library/Logs/CoreSimulator/40CC7C91-5FD8-485E-AC76-3947705A1CB7/system.log’
Error code 1 for command: ios-sim with args: launch,/Users//myApp/platforms/ios/build/emulator/myApp.app,–devicetypeid,com.apple.CoreSimulator.SimDeviceType.iPhone-6,–stderr,/Users//myApp/platforms/ios/cordova/console.log,–stdout,/Users//myApp/platforms/ios/cordova/console.log,–exit
Error: /Users//myApp/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:134:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
I am new to this, just found our I will need Apple Developers Account to Build it as Native app. (Should have read the instruction clearly ) Leaving this here so others can refer it. I will come back and update this thread.
(1) Had to buy apple dev license first and installed the certificate with xcode. Restarted the machine
Now I get different error
No target specified for emulator. Deploying to iPhone-6 simulator An error was encountered processing the command (code=146): Exception encountered connecting to CoreSimulatorBridge: Unable to connect to CoreSimulatorBridge ENOENT, no such file or directory ‘/Users/dwitibisaria/Library/Logs/CoreSimulator/40CC7C91-5FD8-485E-AC76-3947705A1CB7/system.log’ Error code 1 for command: ios-sim with args: launch,/Users/dwitibisaria/myApp1/platforms/ios/build/emulator/myApp1.app,–devicetypeid,com.apple.CoreSimulator.SimDeviceType.iPhone-6,–stderr,/Users/dwitibisaria/myApp1/platforms/ios/cordova/console.log,–stdout,/Users/dwitibisaria/myApp1/platforms/ios/cordova/console.log,–exit Error: /Users/dwitibisaria/myApp1/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:134:23) at ChildProcess.emit (events.js:110:17) at maybeClose (child_process.js:1015:16) at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
(2) Than I had to open the IOS project file from XCODE, had to give permission on folder
I selected ios development from code sining menu under build setting in xcode
again restarted everything and now get different error
I run from XCODE and it works fine. If I run from command line than get same error.