cordova-ios
                                
                                 cordova-ios copied to clipboard
                                
                                    cordova-ios copied to clipboard
                            
                            
                            
                        Show [ios-sim] Simulator already running error if simulator is already running when execute cordova run ios
Hey experts,
Please check this if it's a bug or the expected behavior. Thanks!
- Create sample app and add iOS platform
- Open simulator
- Execute cordova run ios in this target simulator
- Build successfully
- Show error [ios-sim] Simulator already running
- App cannot auto-open in simulator
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')
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.
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.
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.
@breautek I tried to start the Simulator app first and then did cordova run ios, but the same error occurred. This problem is slowing down the development on iOS and annoying.