29

I have update my xcode to 14.1 and macOS to Ventura 13.0.1. When I run my app from xcode on a simulator iPhoneSE 3rd generation (iOS 16) it works fine a few times. After that xcode is unable to launch app on simulator.

The number of time I try to run it keep adding Launching [App Name] to processBuild screenshot .

If I restart simulator it start working again but same thing happens after few runs.I also created new simulator and same thing happens to it as well.

Note: I'm facing same issue for different projects so I think it's not related to my project.

mansoor ali
  • 311
  • 3
  • 3
  • For me, the hack to the problem is, instead of stopping the build from Xcode, just press the home button in the simulator and kill the app. That way you don't need to re-start the simulator and it saves some time. Yes it is frustrating. – user832 Jan 31 '23 at 19:40
  • Finally, Xcode 14.3 works great. – Elad Apr 02 '23 at 07:40
  • 2
    xcode 14.3, still facing same issue, and there is no Run with Rosetta Stone option. Macbook pro 16" m1 pro, flutter apps runs great, native apps crash every few runs! – MBH Apr 23 '23 at 17:52
  • Please find the possible answer here: https://stackoverflow.com/a/76665691/8751294 – Jusuf Saiti Jul 11 '23 at 21:12
  • @MBH For Xcode 14.3.1 you can go to Product->Destination->Destination Architectures to run on Rosetta. – mansoor ali Aug 17 '23 at 12:55

8 Answers8

10

I was facing this issue on an M2 Macbook Air, every build would open the simulator the first time, but on a second run it would hang on a black screen during "Launching app." It turns out the "fix" was to disable "Open using Rosetta" (Applications > Xcode > Right click > Get Info) which I had turned on because of a third party dependency in a work project that didn't create a proper universal binary, which broke using the simulator on M1.

I think people updating to the new version are installing separately, which has the same effect of disabling the rosetta setting if they were using it already.

Jason Clardy
  • 239
  • 3
  • 6
  • 3
    This didn't fix my issue but I think you're pointing in the right direction. My project is using some old dependencies so maybe that's the issue. – mansoor ali Jan 11 '23 at 07:32
  • I am facing the same issue on M2 with 14.2. I checked the info and "Open using Rosetta" is not selected. – HAK Apr 17 '23 at 10:16
  • 3
    I don't see this option at Xcode 14.3 to disable Rosetta in Get Info settings – ack May 10 '23 at 10:24
  • It worked for me. Thanks. Other than this, manually quitting application from simulator instead of stopping from Xcode can also work. – Zahid Usman Cheema Jun 10 '23 at 09:45
0

Open Activity Monitor, then search launch_sim, kill this process, then I can rerun the sim

enter image description here

m0zgen
  • 569
  • 7
  • 20
zmj
  • 11
0

I recently upgraded from an old Mac Book Pro 2016 to Mac Book Pro M2 2023 with Xcode 14.3. The first time the simulator would launch the app - and subsequent times I would just see "launching" in Xcode and nothing would happen (I could quite the sim and then it would work). I discovered that removing Build Settings -> Excluded Architectures -> arm64 for my debug and release builds fixes this problem. As noted in comment in Jason's answer, I don't see the option to disable "Open using Rosetta" at Xcode 14.3.

ack
  • 289
  • 2
  • 12
0

Just a workaround not a real fix is to add a run script so it will restart Simulator automatically.

if [[ $(uname -m) == 'arm64' ]]; then

pkill Simulator

fi

or another way is to just shut down device instead of closing simulator, also should be fine for intel users

xcrun simctl shutdown all

Script checking if its M1/M2 machine or Intel, because on Intel it doesn't work as fast as M1/M2

enter image description here

canister_exister
  • 567
  • 4
  • 15
0

The problem in my case turned out to be that new projects, by default, have parallel testing turned on. But this feature is buggy.

Go to your scheme or test plan and turn parallel testing off!

enter image description here

Tests will then reliably launch as expected.

matt
  • 515,959
  • 87
  • 875
  • 1,141
0

I had exactly the same issue. Seems to me that the issue was really in Rosetta. It appeared to me that I used a simulator with Rosetta but there are still options which don't use Rosetta and I switched to one of them and everything started to work just fine.

simulators rosetta basic simulators

-3

I was facing this issue by way of temporary solution likes

  1. a scheme's "Build Pre-actions"
  2. killall "Simulator" || true
HangarRash
  • 7,314
  • 5
  • 5
  • 32
Sovanndy Ul
  • 97
  • 1
  • 2
  • 5
-5

This issue is fixed in Xcode Version 14.3

Fast Coderz
  • 321
  • 1
  • 13