Unable to stop application on simulator or launch new builds after (M1, Xcode 14.1)

Hi,

I recently moved from Intel to an M1 Mac. Now on M1 Mac with Xcode 14.1 on Ventura, stopping the simulator and rerunning no longer works.

  1. First build and launch of the application to simulator works fine
  2. However, stopping the running application (by pressing square button) does not immediately stop the app, instead within a minute or so, the app screen will turn black screen
  3. Further build and launch post #2 will be stuck at "Launching <Project name>" and "Attaching <Project name> to <Simulator name>"
  4. I will have to close and reopen the simulator in order to build and launch on simulator again.

More context in case they are related to the issue:

  • My application uses MetalKit and Cocoapods libraries.
  • For custom Cocoapods frameworks to build and run on simulator, I followed https://stackoverflow.com/a/70535420
  • One of the Cocoapod library's spec is below:
spec.pod_target_xcconfig = {    'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64'  }  spec.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
  • My architecture build setting is attached below

I have the same issue as well, started with Xcode14 even with Monterey. I did a clean re install and it it not working. A friend from work is having the same issue. Seems it is only related to Apple Silicon Macs.

I have been facing same issue since i updated my MACOS to Ventura and Xcode to 14.2 . My machine is also having M1 processor. It's really frustrating to kill and restart simulator every time i need to rerun my App. Can anybody help with the fix ?

I also tried many ways, but didn't fix this issue.

Try resetting the "Don't ask me" warning from Xcode preference. and when you get the alert about already running an instance tick the don't ask me and tap on replace.

I am experiencing the same problem. Did you or someone else manage to find a solution?

Most of my team are facing this same problem. devi.mport's did not make a difference

Same issue. Tried to completely reinstall Xcode, but issue is still there. Noticed that with some projects where I don't use pods, simulator works well. It looks like that Simulator loose the connection with Xcode when app is running and using some pods. Still don't know how to fix it.

I have the same issue. Not able to stop a running app on simulator from the xcode 'stop' button. Launching another build will switch the simulator to a black screen. Closing the simulator and letting xcode laucnh a new one from a build always works. (Mac M2, Xcode 14.3)

Same here, it seems to be an Apple Silicon Issue, sadly there is no response from Apple to this topic even if its obvious that its nothing the developers do wrong. I clean installed my MacBook Pro M2Max, installed XCode 14.3 and right away ran into this trouble.

I'm not sure yet, if it will works permanently, but I've tried below commands and it works for me. MacBook Air M1, MacOS Ventura 13.4.1 (22F82)

sudo xcrun simctl erase all

xcrun simctl shutdown all

https://stackoverflow.com/questions/14668445/launch-ios-simulator-from-xcode-and-getting-a-black-screen-followed-by-xcode-ha?rq=2

Choose both destinations as in the screenshot below and run the app on simulator with (Rosetta) encryption.

Unable to stop application on simulator or launch new builds after (M1, Xcode 14.1)
 
 
Q