COVIDSafe code from version 1.9

This commit is contained in:
covidsafe-support 2020-08-03 15:47:51 +10:00
parent 2257c542ed
commit 5455912f0a
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) {