apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.15k stars 987 forks source link

Show [ios-sim] Simulator already running error if simulator is already running when execute cordova run ios #1362

Open EzioLi01 opened 10 months ago

EzioLi01 commented 10 months ago

Hey experts,

Please check this if it's a bug or the expected behavior. Thanks!

  1. Create sample app and add iOS platform
  2. Open simulator
  3. Execute cordova run ios in this target simulator
  4. Build successfully
  5. Show error [ios-sim] Simulator already running
  6. App cannot auto-open in simulator
cgimenez commented 8 months ago

Hi ! Same problem here with latest cordova tooling, and no matter the ios simulator used

cordova emulate ios
[.. bunch of output]
** BUILD SUCCEEDED **

Deploying to simulator
No target specified for emulator. Deploying to "iPhone-SE-3rd-generation, 17.0" simulator.
[ios-sim] device.name: iPhone SE (3rd generation)

[ios-sim] device.runtime: iOS 17.0

[ios-sim] device.id: 5B995DC7-5578-438D-AB4E-EE4248886DBC

Error: Unhandled error. ('[ios-sim] Simulator already running.\n')
Heshyo commented 5 months ago

Same. I have to first close the simulator before running that command, which is not convenient as the simulator takes quite some time to launch and be ready.

chitgoks commented 4 months ago

Well ... no. Closing the simulator still does not work. The sample cordova app does not get deployed and the simulator does not open. I just started with cordova so im using the latest version and trying out creating a sample app.

What i did for now to deploy it is to open the .xcodeproj in xcode. if you encounter unable to unlock, just set read/write permissions to the whole folder.

breautek commented 3 months ago

A potential workaround is to simply launch the "Simulator" application.

Apple has 2 applications, a simctl application which is responsible for booting and managing simulators, and a Simulator app which acts as the "frontend" GUI application into all booted simulators. So it sounds like the simctl is being used, but the Simulator app isn't being launched.