func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
print(UIApplicationBackgroundFetchIntervalMinimum)
UIApplication.shared.setMinimumBackgroundFetchInterval(UIApplicationBackgroundFetchIntervalMinimum)
return true
}
func application(_ application: UIApplication, performFetchWithCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
completionHandler(.newData)
}
这是我的代码,当我在 XCode 中调试 > 模拟后台获取我的应用程序崩溃时,无缘无故。我在功能>后台模式>后台获取中激活...有什么想法吗?
它仅在模拟器中的 iPhone 上崩溃我没有问题。