Tag Archives: emulate

Cordova / Phonegap ios emulate results in a black screen in simulator — SOLUTION


Trying to get Cordova to run the simulation of the default sample hello world app you type:
cordova emulate ios

At this point the emulator ran and the simulation was merely a black screen inside the simulator window. After a while the following error eventually was displayed in the console:

The Error

Session could not be started: Error Domain=DTiPhoneSimulatorErrorDomain Code=2 "Simulator session timed out." UserInfo=0x7fd5848179d0 {NSLocalizedDescription=Simulator session timed out.}

Error: /Users/XXXX/XXXX/platforms/ios/cordova/run: Command failed with exit code 1
at ChildProcess.whenDone (/usr/local/lib/node_modules/phonegap/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)


To fix this I reset the permissions on the project directory by right clicking the project directory, clicking “Get Info”, clicking the lock to allow access to edit the settings, selected the “Gear” dropdown and selected “Apply to enclosed items…”. This successfully solved the problem for me so that re-running the emulator with works now.