Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 631
CristianMoisei Avatar asked Sep 16 '20 23:09

CristianMoisei


People also ask

How do I reduce app launch time?

Eliminate hidden costs by removing unused frameworks. Outdated and extraneous code adds to your app launch duration. Defer expensive work until after the first frame is rendered: If there are any processes that are not needed for the app to launch, when possible, delay heavy tasks.

How can I make Xcode run faster?

In Build Settings > Optimization Level > change to Fast, Whole Module Optimization. In Build Settings > Swift Flags > Add -Onone.

Why does Xcode take so long to run?

With 4GB of RAM, Xcode is going to swap to disk a lot. With a spinning disk, swapping will be slow. If you can upgrade to an SSD and/or add RAM, that will help, otherwise you're kind of stuck.

Is iOS 14 6 slower than previous iOS?

I installed IOS 14.6 this morning. it looks all apps/functions no longer slow or laggy. However internet speed is slower than before (IOS 14.6: Over 200 Mbps) after the restated internet speeds are ranged from 100 Mbps to 130 Mbps. after having waited for 10 mins to 20 mins, it comes to the previous speed.

Why does it take so long for iOS 15 to update?

If iOS 15 10 hours to update or takes a long time to update, that would be too bad. And your device update has been in a stagnant state for a long time, it is very likely that the update process went wrong. For the moment, you can try these solutions to fix the device.

Why are my Apps not working after iOS 14 update?

If the apps installed on your iPhone aren’t functioning as smoothly after updating to iOS 14, it’s time to update all your apps. Some apps may have received optimization updates to work properly with iOS 14, so take some time to get your apps updated.

How long does Xcode pause when running against simulator?

When running against simulator Xcode says "launching app", "attaching to app", and then "running app", at the running app stage we get a ~30 second pause. debugserver at 100% activity at that time.


3 Answers

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:

  • Apple forum post: Xcode 11 hangs while attaching debugger to ios process
  • StackOverflow answer from: Can I delete data from the iOS DeviceSupport directory?
like image 117
manman Avatar answered Oct 16 '22 22:10

manman


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.

like image 33
jxd Avatar answered Oct 16 '22 21:10

jxd


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.

like image 26
tomisacat Avatar answered Oct 16 '22 22:10

tomisacat