COVIDSafe code from version 1.9 (#18)

This commit is contained in:
COVIDSafe Support 2020-08-03 16:01:39 +10:00 committed by GitHub
parent 2257c542ed
commit 3b1d8fa3f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
41 changed files with 4217 additions and 3998 deletions

View file

@ -427,14 +427,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
UserDefaults.standard.set(token, forKey: "deviceTokenForAPN")
let messageRequest = MessageRequest(remotePushToken: token)
MessageAPI.getMessages(msgRequest: messageRequest) { (response, error) in
MessageAPI.getMessagesIfNeeded(completion: { (response, error) in
if let error = error {
DLog("Get messages error: \(error.localizedDescription)")
return
}
DLog("Get messages success, device token saved")
}
})
}
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {