Xcode 12 is slow when launching apps (even sample projects)

Running a project from Xcode 12 seems to be very slow during launch. Even the example projects from Apple.

Basically it feels as if the app is stuck on the launch screen?

However, if I unplug from my Mac and just launch via tapping on the App icon, it's super fast.

Anyone is having the same issue?

Accepted Reply

This isn't Xcode 12 specific.

Deleting the contents of ~/Library/Developer/Xcode/iOS DeviceSupport seems to be the fix (worked for me just now):
https://developer.apple.com/forums/thread/123068?answerId=420683022#420683022
  • It does help only after restarting xCode, then on the next run it'll take a while to rebuild the content of this folder (what will delay the run on the device), and after that it does work much faster.

Add a Comment

Replies

Same issue here.
Deleting the contents of ~/Library/Developer/Xcode/iOS DeviceSupport (also logs and caches) didn't solve the problem for me.
With this configuration:
  • Big Sur 11.3

  • Xcode 14.5

  • Simulator 14.5

my app start takes more than 30 seconds when running from xcode. Normal start of installed app takes 2 seconds.
Xcode says "launching app", "attaching to app", and then "running app", at the running app stage I get a ~30 second pause. debugserver at 100% activity at that time.

Unticking "Debug executable" makes start instantaneous but makes debugging impossible, it's not a solution.
On the real device (running iOS 14.4) start with attached debugger takes around 6 seconds.
Since version 12.5, Xcode is extremely slow to do anything, build, code completion, run unit tests.

Deleting the contents of ~/Library/Developer/Xcode/iOS DeviceSupport didn't fix the problem.
defaults delete com.apple.dt.Xcode
rm -rf $HOME/Library/Application\ Support/Developer/Shared/Xcode
rm -rf $HOME/Library/Saved\ Application\ State/com.apple.dt.Xcode.savedState
rm -rf $HOME/Library/Preferences/com.apple.dt.Xcode.*
@_whatthedeuce It doesn't help unfortunately. Still have trouble with attaching debugger and slow running time.