I just upgraded both of my Macbook Pro M2 to MacOS Ventura 13.0 and Xcode to Version 14.1 (14B47b)
After updating my xcode, my xcode is always stuck on "launching app" and simulator is on blackscreen every 2nd time I run the code.
Steps to duplicate.
- Close the simulator
- Build and run code
- Here, xcode runs the code perfectly.
- After I made changes in code and re-run the code, Xcode is now stuck on "launching app" and simulator is on blackscreen
- To run the code again, I would have to go back to step 1 again to run the app on simulator.
Does anyone have an idea on how can I fix this.
I tried removing derived data, changing simulators but didn’t fixed the issue.
UPD:
I know this is not a solution, but just paste this command to restart simulator automatically. Add Run Script at Build Phase section and enter command "killall Simulator":
:
Run Script command
We will wait fix this problem from Apple in a new version, but for now you could manually restart Simulator or make it automatically through Run Script.
And also I noticed that without restart app runs with black background and you can even swipe to Home Screen.
5
Answers
This is bug with the latest version. you need to quit the simulator and run the project again. You can always file a bug with apple as @matt commented.
The same problem I faced, close the simulator once you run the build without stopping running the code.
Update:
I Have downloaded version 14.2 (14C18) and the problem seems to be fixed
Original answer:
I have the same problem. The only solution I have found so far is that if the app crashes it works fine the next time.
So i added a button to force crash the app in order to save me time for restarting the emulator.
I know this is not a solution but this allows me to continue development until apple fix the problem
I am using xcode 14.1 What I have done is as follows:
Quit the simulator & Xcode.
Open terminal and run
It will delete all content of all simulators. By content if you logged in somewhere password will be gone, all developer apps installed in that simulator will be gone.
Doing these resolved my issue. Hope it helps.
Same problem here: After first run of an app using XCode debug the simulator is just black. Killing the app does not help.
Debugging/running the simulator with XCode 14.1 was fine until I updated to Ventura, the problem started with the OS upgrade.
This did not work for me:
Manually resetting the simulator also did not work.
Only thing that helps at the moment is closing the simulator and starting it again.