Switch to async didReceiveRemoteNotification.
This commit is contained in:
parent
f6e8d3afb1
commit
e371d31bd6
|
@ -125,19 +125,16 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
|
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) async -> UIBackgroundFetchResult {
|
||||||
DispatchQueue.main.async {
|
|
||||||
self.resumeDatabaseProcessingIfNecessary()
|
resumeDatabaseProcessingIfNecessary()
|
||||||
self.accountManager.receiveRemoteNotification(userInfo: userInfo) {
|
await accountManager.receiveRemoteNotification(userInfo: userInfo)
|
||||||
self.suspendApplication()
|
suspendApplication()
|
||||||
completionHandler(.newData)
|
return .newData
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func applicationWillTerminate(_ application: UIApplication) {
|
func applicationWillTerminate(_ application: UIApplication) {
|
||||||
shuttingDown = true
|
shuttingDown = true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue