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

16,505

Solution 1

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:

Solution 2

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.

Solution 3

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.

Solution 4

  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.

Solution 5

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

Share:
16,505

Related videos on Youtube

CristianMoisei
Author by

CristianMoisei

Updated on October 12, 2021

Comments

  • CristianMoisei
    CristianMoisei over 2 years

    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?

    • 蘇哲聖
      蘇哲聖 over 3 years
      I have the same problem, I have to wait about 2 minutes until the launch is finished!
    • Benjamin Wen
      Benjamin Wen over 3 years
      Yeah, takes forever to launch. I actually can't imagine how Apple testers pass this Xcode version.
    • Cloud9999Strife
      Cloud9999Strife over 3 years
      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.
    • user2330482
      user2330482 over 3 years
      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.
    • liudasbar
      liudasbar almost 3 years
      Same issue on Xcode 12.5 (with iOS 15 support files) and iOS 15 Developer Beta 1
  • CristianMoisei
    CristianMoisei over 3 years
    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.
  • Mofawaw
    Mofawaw over 3 years
    For me, my app just crashes after waiting for 1 minute...
  • manman
    manman over 3 years
    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
  • Adam Bardon
    Adam Bardon over 3 years
    I did both steps, but the slow launch issue was still there. Tried one more time and now it's back to normal.
  • MosTwanTedT
    MosTwanTedT over 3 years
    Not working for me as well... after second try Xcode crashes.
  • Charlie Pico
    Charlie Pico over 3 years
    Yup this did it! Thanks A LOT!
  • Georg
    Georg over 3 years
    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.
  • Dom Bryan
    Dom Bryan over 3 years
    This isn't a great solution as it stops the ability to debug
  • Dom Bryan
    Dom Bryan over 3 years
    This isn't a great solution as it stops the ability to debug
  • tomisacat
    tomisacat over 3 years
    @DomBryan Sure, it's only a workaround, definitely it will be bug fixed in the future version of Xcode.
  • tomisacat
    tomisacat over 3 years
    @刘俊利 Yep, it disabled the debug function, it's only a workaround for current Xcode version.
  • jxd
    jxd over 3 years
    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!
  • Herr der Töne
    Herr der Töne over 3 years
    That did it for me, but I tried the "Unpair" method first. So there's a chance both steps are needed.
  • 刘俊利
    刘俊利 over 3 years
    Worked in Xcode 12.1 and support for iOS 14.1, 14.0, 12.4.5, etc..
  • CristianMoisei
    CristianMoisei over 3 years
    That's good to know @Benjamin Wen, glad to hear they fixed it in the latest versions.
  • LGP
    LGP over 3 years
    @CharlyPico the order of the answers frequently change when up- or down-voted. Please give a link or proper description instead.
  • NaveedUlHassan5
    NaveedUlHassan5 over 3 years
    I had the same problem in Xcode 12.1, and it still exists after updating it to Xcode 12.2
  • Lorenzo
    Lorenzo over 3 years
    I removed all the simulator and reinstalled but the same. So this solution doesn't help
  • Lorenzo
    Lorenzo over 3 years
    This is a workaround to deploy the App on the device but doest't solve the issue if you want to debug in the device
  • Benjamin Wen
    Benjamin Wen over 3 years
    @NaveedUlHassan5 and the iOS version? My Xcode is now 12.2, and it goes smoothly with iOS 14.1. I have not tried it with iOS 14.2 yet.
  • NaveedUlHassan5
    NaveedUlHassan5 over 3 years
    iOS version 14.2, i found it's solution on apple's forum. Cabeaulac comment was helpful. developer.apple.com/forums/thread/651012
  • DeveloperSammy
    DeveloperSammy over 3 years
    Happened to me after upgrading device to iOS14.2. Strange thing is my iPad works fine ...
  • frank
    frank over 3 years
    @GakkieNL maybe it's just on iOS and not on iPadOS, I guess.
  • L33MUR
    L33MUR about 3 years
    Agree! I updated to Xcode 12.4 and iPadOS14.4 and it solved the issue for me too
  • firetrap
    firetrap about 3 years
    Tried everything nothing works for me. Mac OS 11.3 and Xcode 12.5(12E262)
  • fisher
    fisher almost 3 years
    For me Xcode 13 b1 seemed to solve the issue on initial tries. However, I am now seeing the issue resurface on Xcode 13 as well..
  • Abhishek Thapliyal
    Abhishek Thapliyal almost 3 years
    this works for me, even deleting and ~/Library/Developer/Xcode/iOS DeviceSupport. Then simply reopen Xcode. not worked
  • Sam
    Sam over 2 years
    Same here, xcode 13.0 beta 5 (13A5212), iPhone 11 running iOS 15. takes up to 3 minutes to launch the app. launching the app on iPhone running iOS 14.* works much faster..
  • Olle Lind
    Olle Lind over 2 years
    Works for Xcode 13. Thanks for saving me plenty of time, none of the above answers worked.
  • multitudes
    multitudes over 2 years
    I updated to Xcode 13.2 beta and I have the issue as well (macOS 11.5). Tried everything without success
  • Artem
    Artem over 2 years
    how to do that in AppCode?
  • Artem
    Artem over 2 years
    How to do that for AppCode?