CristianMoisei
CristianMoisei

Reputation: 2279

Slow app launch time after updating to iOS 14 and Xcode 12

I noticed that the launch time of my app has increased significantly (it takes a full minute now vs seconds before) since updating my device to iOS 14 and using Xcode 12. I tried several Xcode 12 betas and ran the app in the simulator with no issues, however the public releases seem to bring this issue.

I tested several of my apps and they all face this issue. Running the app again (without Xcode) is instant, even after restarting the device.

To be clear, I'm not talking about build time here, this is the time it takes the app to start after the splash screen shows up and Xcode's status is 'Running on iPhone'

Has anyone else experienced this issue or could it be something related to my machine?

Upvotes: 94

Views: 24329

Answers (10)

linto jacob
linto jacob

Reputation: 171

  1. Unpair your phone from Xcode

    Launch Xcode with your phone not plugged in

  • plug your phone in

    under devices in Xcode, unpair your phone

  1. stop Xcode
  2. run these
rm -rf ~/Library/Developer/Xcode/iOS\ DeviceSupport
rm -rf ~/Library/Developer/Xcode/iOS\ Device\ Logs
rm -rf ~/Library/Developer/Xcode/DerivedData
  1. start Xcode
  2. plug phone-in

Upvotes: 2

Mitul Pokiya
Mitul Pokiya

Reputation: 172

I'm getting same problem and I'm fix it this way

delete folders inside

~/Library/Developer/Xcode/iOS DeviceSupport/

, then run Xcode and launch an app again, problem solved.

Upvotes: 4

skrew
skrew

Reputation: 889

Having the same problem since yesterday...

I tried all the solutions here, without success.

What worked for me was to copy debugserver from Xcode 11.7 to Xcode 12.5 and i got back an (almost) immediate launch. Of course it's broke interactive debugger but helps to isolate the problem (LLDB)

After a lot of testing, downgrading macOS version to 11.2.3 fixes the launch problem (back to 3 seconds launch instead of 30+ seconds)

Downgrading is easy: In console, type:

softwareupdate --fetch-full-installer --full-installer-version 11.2.3

You will found the installer in /Applications.

Tested on 2 MBP without problem.

Edit: The 11.3.1 released a few hours ago still have the problem.

Edit 2: Xcode 13 b1 fixes the problem (even with MacOS 11.4). I don't know why Apple have not released a new Xcode 12 with a LLDB fix !

Edit 3: Xcode 12.5.1 fixes the problem for me

Upvotes: 5

Ankit Goyal
Ankit Goyal

Reputation: 3049

  1. In the Xcode menu, Go to Product > Scheme > Edit Scheme
  2. Open the Info tab
  3. Uncheck the Debug executables checkbox

Xcode scheme editor screenshot

  1. Close the Window.
  2. Run the app and see the difference.

Upvotes: 12

manman
manman

Reputation: 2488

I have the same problem, but solved this by doing the following things:

For simulators running iOS 14, delete folders inside ~/Library/Developer/Xcode/iOS DeviceSupport/ (folder's name started with "14").

For devices running iOS 14, select Xcode window tab, click Devices and Simulators, find your device, right-click to unpair the device

After doing the work, re-run your app, everything should be ok.

References:

Upvotes: 45

Raymond
Raymond

Reputation: 1258

Simply update iOS and/or Xcode and it will solve your problem. Rest of the solutions given above are just workarounds and may not always work. For me none of the above solution worked. I just update iOS and it solved the issue.

Upvotes: 2

wzso
wzso

Reputation: 3905

In my case, neither unpairing device nor deleting DeviceSupport files worked. But after I upgrade to iOS 14.1 and Xcode 12.1, it can work normally.

Upvotes: 0

frank
frank

Reputation: 2404

Delete ~/Library/Developer/Xcode/iOS DeviceSupport/ and unpair/pair device doesn't work for me too and disable Debug executable make me can't debug my program.

I have no idea what to do, however when I upgrade my iPhone from iOS14 to iOS14.1 the problem dismiss. So, I think this should be an iOS bug.

Upvotes: -1

jxd
jxd

Reputation: 606

I also had this problem, here on Xcode Version 12.1 (12A7403).

The proposed solution to "Unpair" the device in Xcode "Devices and Simulators" didn't work for me (and lot's of people here). Xcode simply keeps crashing when trying that. Hard-reset of the device didn't solve it either.

What did the trick for me: Delete the iOS 14.1 folder inside ~/Library/Developer/Xcode/iOS DeviceSupport. Then simply reopen Xcode.

It takes a while for Xcode to "copy cache files" from the iPhone but once that's finally done, normal debug build and run behaviour is back, without the long delay.

Upvotes: 35

tomisacat
tomisacat

Reputation: 526

Delete ~/Library/Developer/Xcode/iOS DeviceSupport/ and unpair/pair device doesn't work for me.

Click Edit Scheme of the project target, select Run phase row, and uncheck Debug executable below the Info tab, this solved my problem.

Upvotes: 31

Related Questions