aboutsummaryrefslogtreecommitdiff
path: root/iosApp/iosApp/AppDelegate.swift
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-02-25 22:02:51 -0600
committerIván Ávalos <avalos@disroot.org>2022-02-25 22:02:51 -0600
commit136e4ebe289e286b62c8e37bcd512de6df0de0d3 (patch)
tree894ce7d172a39b0a7c99e19e9b4d25064549529a /iosApp/iosApp/AppDelegate.swift
parentef7a88961841752cb1a38a39f5e0cc298b463f56 (diff)
parent70141fe10227ef4eca2ef7ae4b2b9d7c8fac5675 (diff)
downloadetbsa-trackermap-mobile-136e4ebe289e286b62c8e37bcd512de6df0de0d3.tar.gz
etbsa-trackermap-mobile-136e4ebe289e286b62c8e37bcd512de6df0de0d3.tar.bz2
etbsa-trackermap-mobile-136e4ebe289e286b62c8e37bcd512de6df0de0d3.zip
Merge branch 'main' into ios_reports
Diffstat (limited to 'iosApp/iosApp/AppDelegate.swift')
-rw-r--r--iosApp/iosApp/AppDelegate.swift8
1 files changed, 8 insertions, 0 deletions
diff --git a/iosApp/iosApp/AppDelegate.swift b/iosApp/iosApp/AppDelegate.swift
index 4233910..72e3e92 100644
--- a/iosApp/iosApp/AppDelegate.swift
+++ b/iosApp/iosApp/AppDelegate.swift
@@ -39,6 +39,14 @@ class AppDelegate: NSObject, UIApplicationDelegate {
print(userInfo)
return UIBackgroundFetchResult.newData
}
+
+ func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
+ #if DEBUG
+ Messaging.messaging().setAPNSToken(deviceToken, type: .sandbox)
+ #else
+ Messaging.messaging().setAPNSToken(deviceToken, type: .prod)
+ #endif
+ }
}
extension AppDelegate: UNUserNotificationCenterDelegate {