从多任务托盘中删除后 iPhone 应用程序冻结

发布于 2024-10-25 17:45:51 字数 354 浏览 3 评论 0原文

我的应用程序在从 XCode 启动时工作正常,并且从保存的状态正常启动备份,但问题是当我打开多任务托盘并手动关闭应用程序时。以这种方式关闭应用程序后,当应用程序重新打开时,它不会从加载屏幕开始,而是从关闭时所在的屏幕开始,但它被冻结,并且从此状态按下主页按钮会导致跳板崩溃。

我的第一个想法是应用程序打开时间太长,因此在 applicationDidFinishLaunching 函数中,我在新线程中加载数据(我还尝试了执行SelectorInBackground和延迟后的performSelector),除了上面描述的奇怪问题之外,这工作正常。

此外,不会向设备日志写入任何内容,也不会创建崩溃报告。

任何有关此问题的帮助将不胜感激,谢谢。

My app works fine when launching from XCode, and it starts back up from a saved state fine, but the problem is when I open the multitasking tray and manually close the app. After closing the app this way, when the app reopens it doesn't start from the loading screen, it starts from the screen it was at when it was closed, but it is frozen and pushing the home button from this state causes springboard to crash.

My first thought was that the app was taking too long to open, so in the applicationDidFinishLaunching function I load data in a new thread (I have also tried performSelectorInBackground and performSelector after delay) and this works fine except for the strange problem described above.

Also, nothing is written to the device log and no crash report is created.

Any help with this would be greatly appreciated, Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

清风无影 2024-11-01 17:45:51

当您关闭应用程序时,Xcode 调试器是否仍然连接?这会导致您在从任务栏终止应用程序时看到的行为。

Is the Xcode debugger still attached when you shut down the app? That would cause the behavior you're seeing when you terminate the app from the task bar.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文