gpt4 book ai didi

iOS应用程序在后台被杀死 - 如何调试?

转载 作者:行者123 更新时间:2023-12-04 09:10:03 25 4
gpt4 key购买 nike

我的 iOS 应用程序在后台运行时终止。我在设备控制台中得到以下日志:

Background Task 160 (""), was created over 30 seconds ago. In applications running in the background, this creates a risk of termination. Remember to call UIApplication.endBackgroundTask(_:) for your task in a timely manner to avoid this.


其次是

Background task still not ended after expiration handlers were called: . This app will likely be terminated by the system. Call UIApplication.endBackgroundTask(_:) to avoid this.


并且应用程序在从后台恢复时终止并重新启动
新的指标套件后台退出数据 (iOS 14) 还报告 BackgroundTaskAssertionTimeoutExits 正在杀死我的应用程序
在中断 UIApplicationEndBackgroundTaskError ,我得到以下回溯:
UIApplicationEndBackgroundTaskError backtrace
我自己没有实现任何后台任务,但应用程序中集成了一些第三方库。
调试这个的正确方法是什么?

最佳答案

如果您没有启动任何后台任务,并且您没有执行任何操作,则很可能是您的某些 3rd 方框架导致了崩溃。
更新到所有依赖项的最新版本,以查看问题是否已修复。
如果您的问题很容易重现,请尝试逐个禁用它们以查看导致崩溃的原因。
之后,转到库支持页面,看看是否有针对您的问题的错误,如果没有打开错误。
从通常的嫌疑人开始,Analytics , Loggers继续。
也看看这个线程:App is crashing on only iOS 13 in the background mode

关于iOS应用程序在后台被杀死 - 如何调试?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64906842/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com