aboutsummaryrefslogtreecommitdiff
path: root/iosApp
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-02-19 23:35:37 -0600
committerIván Ávalos <avalos@disroot.org>2022-02-19 23:35:37 -0600
commitbf038830e299dface34f6938d3ffdef83b5ff949 (patch)
tree3037208c5906e4f45656e9d8a0fc98a273e05446 /iosApp
parent203471d59b06f0dd49fdcd95350601f7068b3dab (diff)
parentdfd9ba657b93a6f5b98246f6d174e02cc4132d46 (diff)
downloadetbsa-trackermap-mobile-bf038830e299dface34f6938d3ffdef83b5ff949.tar.gz
etbsa-trackermap-mobile-bf038830e299dface34f6938d3ffdef83b5ff949.tar.bz2
etbsa-trackermap-mobile-bf038830e299dface34f6938d3ffdef83b5ff949.zip
Merge branch 'main' of https://git.sr.ht/~avalos/trackermap-mobile
Diffstat (limited to 'iosApp')
-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 {