更新到iOS 14和Xcode 12后,应用启动时间变慢 [英] Slow app launch time after updating to iOS 14 and Xcode 12

查看:362
本文介绍了更新到iOS 14和Xcode 12后,应用启动时间变慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到,自从将设备更新到iOS 14并使用Xcode 12之后,我的应用程序的启动时间已显着增加(现在要花一整分钟,而之前是几秒钟),我尝试了多个Xcode 12 Beta,并在模拟器没有问题,但是公开发布似乎带来了此问题.

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.

我测试了我的几个应用程序,它们都面临这个问题.即使重新启动设备,也可以立即再次运行该应用程序(无需Xcode).

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.

要清楚,我在这里不是在讨论构建时间,这是启动屏幕显示且Xcode的状态为在iPhone上运行"之后启动应用程序所花费的时间.

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?

推荐答案

我有相同的问题,但是通过执行以下操作解决了此问题:

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

对于运行iOS14的模拟器,请删除~/Library/Developer/Xcode/iOS DeviceSupport/(文件夹名称以14.0开头)中的文件夹.

For simulators run iOS14, delete folders inside ~/Library/Developer/Xcode/iOS DeviceSupport/ (folder's name started with 14.0).

对于运行iOS14的设备,选择Xcode window选项卡,单击Devices and Simulators,找到您的设备,右键单击至unpair the device

For devices run iOS14, 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.

参考:

  • https://developer.apple.com/forums/thread/123068?answerId=420683022#420683022
  • https://stackoverflow.com/a/29931912

这篇关于更新到iOS 14和Xcode 12后,应用启动时间变慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆