67

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?

Paresh Mangukiya
  • 14,668
  • 7
  • 90
  • 90
CristianMoisei
  • 1,904
  • 2
  • 18
  • 21
  • 14
    I have the same problem, I have to wait about 2 minutes until the launch is finished! – 蘇哲聖 Sep 17 '20 at 08:21
  • 1
    Yeah, takes forever to launch. I actually can't imagine how Apple testers pass this Xcode version. – Benjamin Wen Oct 27 '20 at 12:37
  • I updated to Xcode 12.1 and after that to the latest beta of Big sur, it solved the issue for me, but my colleague did the same and it did not fix his issues. Very frustrating. – Cloud9999Strife Oct 29 '20 at 09:57
  • Have you updated to 14.1? Maybe that's what your colleague didn't do yet, it solved it for me without using a beta. – user2330482 Nov 02 '20 at 21:18

10 Answers10

32

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:

shim
  • 7,170
  • 10
  • 62
  • 95
manman
  • 443
  • 4
  • 7
  • Thanks @manman, I had to delete the entire Xcode folder also after unpairing the device (as suggested in the thread you shared) but it fixed the issue in the end. – CristianMoisei Sep 17 '20 at 11:10
  • 2
    For me, my app just crashes after waiting for 1 minute... – Mofawaw Sep 20 '20 at 16:32
  • 6
    Yes, unpairing device will cause a crash on Xcode 12. After trying many times, I found a way to not crash when unpairing: If your device and computer are already paired, make sure your device is not connected to your mac before opening Xcode. Launch Xcode project, enter Devices and Simulators, then connect your device, unpair your device if you see it. Hope this helps. @KaneCheshire – manman Sep 21 '20 at 03:18
  • 1
    Thanks! That's helpful. – Kane Cheshire Sep 21 '20 at 12:27
  • I did both steps, but the slow launch issue was still there. Tried one more time and now it's back to normal. – Adam Bardon Oct 06 '20 at 14:44
  • 5
    Not working for me as well... after second try Xcode crashes. – MosTwanTedT Oct 11 '20 at 10:29
  • Unpairing device didn't work for me either, even with all the suggested workarounds. Apparently there is a more reliable solution, that fixed it for me. I posted it below! – jxd Oct 22 '20 at 10:55
  • @CharlyPico the order of the answers frequently change when up- or down-voted. Please give a link or proper description instead. – LGP Nov 07 '20 at 08:47
  • 1
    I removed all the simulator and reinstalled but the same. So this solution doesn't help – Lorenzo Nov 14 '20 at 17:22
  • Tried everything nothing works for me. Mac OS 11.3 and Xcode 12.5(12E262) – firetrap Apr 28 '21 at 23:41
30

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.

jxd
  • 518
  • 3
  • 13
14

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.

tomisacat
  • 303
  • 2
  • 10
4

This worked for Xcode 12.2 beta and iOS 14.2:

Untick Debug executable from below paths worked for me.

  1. Product -> Scheme -> Edit scheme -> Select Run (left column) -> untick Debug executable

  2. Product -> Scheme -> Edit scheme -> Select Test (left column) -> untick Debug executable

Then close and run again.

shim
  • 7,170
  • 10
  • 62
  • 95
Paresh Mangukiya
  • 14,668
  • 7
  • 90
  • 90
4

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.

skrew
  • 563
  • 4
  • 14
2

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.

Raymond
  • 794
  • 3
  • 18
2
  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
  3. start Xcode
  4. plug phone-in
linto jacob
  • 193
  • 16
1
  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.
shim
  • 7,170
  • 10
  • 62
  • 95
Ankit Goyal
  • 2,811
  • 1
  • 18
  • 24
  • 16
    It's true that the app now starts as fast as before, but then debugging is not possible anymore. Which is kind of the point of running the app on the device. – Georg Oct 17 '20 at 08:41
  • 4
    This isn't a great solution as it stops the ability to debug – Dom Bryan Oct 19 '20 at 15:05
0

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.

Benjamin Wen
  • 2,386
  • 1
  • 21
  • 38
-1

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.

frank
  • 1,978
  • 1
  • 15
  • 19