Fix background notification processing of CloudKit changes.

This commit is contained in:
Maurice Parker
2020-04-01 20:21:14 -05:00
parent 850d6b5623
commit ea78b5683d
5 changed files with 40 additions and 23 deletions

View File

@@ -112,7 +112,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
DispatchQueue.main.async {
self.resumeDatabaseProcessingIfNecessary()
AccountManager.shared.receiveRemoteNotification(userInfo: userInfo) {
self.suspendApplication()
completionHandler(.newData)
}
}