update ntf server

This commit is contained in:
Evgeny Poberezkin
2022-06-21 11:38:36 +01:00
parent 7723e4ca7a
commit 29eafa9a74
4 changed files with 4 additions and 2 deletions

View File

@@ -42,6 +42,7 @@ class AppDelegate: NSObject, UIApplicationDelegate {
didReceiveRemoteNotification userInfo: [AnyHashable : Any],
fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
logger.debug("AppDelegate: didReceiveRemoteNotification")
print("*** userInfo", userInfo)
if let ntfData = userInfo["notificationData"] as? [AnyHashable : Any],
UserDefaults.standard.bool(forKey: "useNotifications") {
if let verification = ntfData["verification"] as? String,

View File

@@ -18,6 +18,7 @@ class NotificationService: UNNotificationServiceExtension {
override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
logger.debug("NotificationService.didReceive")
print("*** userInfo", request.content.userInfo)
let appState = getAppState()
if appState.running {
contentHandler(request.content)