8

I'm facing problem while running a project in xcode 8.1. Xcode gets stuck during "Waiting for app to launch" process and it keeps loading forever. it does not throw any error also. Project builds fine but it isn't running on the simulator. I tried deleting the derived data. Tried deleting the .xcworkspace file.

I've looked upon these answers

https://stackoverflow.com/a/13834705/4863339

https://stackoverflow.com/a/16037836

These answers don't seem to be helping me much.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Abhishek Harsha
  • 257
  • 4
  • 18
  • Did you tried `command` + `shift` + `K` and rebuild your project ? – Nhat Dinh Feb 03 '17 at 09:09
  • In my case, quitting all applications followed by shutting down and then restarting of system worked!! Some broken connection must have fixed itself on rebooting, I guess!! – iOSer Apr 25 '18 at 07:03

4 Answers4

6

For me restarting mac helped, nothing else I googled did.

Simon Moshenko
  • 2,028
  • 1
  • 15
  • 36
5

Could it be that you disabled automatic start of the app?

Open your scheme via "Edit scheme..." menu, and make sure that "launch" setting in Run settings is set to Automatically.

Apple guide

hybridcattt
  • 3,001
  • 20
  • 37
4

Restarting the simulator helped me in a similar situation.

Another case: Xcode 12. Was stuck on device launch in debug after a while or on the first breakpoint.

Clean, deep clean (Command-Option-Shift-K), restart Xcode, remove the app from the device, run again.

Don't know which step exactly helped, but now all works as usual.

Dren
  • 2,017
  • 21
  • 18
1

I've deleted xcuserdata. it helped in my case

rm -rf /pat/to/[YourProject].xcodeproj/project.xcworkspace/xcuserdata
Alex
  • 1,603
  • 1
  • 16
  • 11