From e0861bf29a6688195019cd74c6f81c61a24ff0a5 Mon Sep 17 00:00:00 2001 From: Isidro Henoch Date: Sat, 19 Feb 2022 13:57:27 -0600 Subject: Register the APNs token to receive fcm notifications --- iosApp/iosApp/AppDelegate.swift | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'iosApp') 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 { -- cgit v1.2.3 From dfd9ba657b93a6f5b98246f6d174e02cc4132d46 Mon Sep 17 00:00:00 2001 From: Iván Ávalos Date: Sat, 19 Feb 2022 23:31:48 -0600 Subject: Xcode did this --- iosApp/iosApp/Info.plist | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'iosApp') diff --git a/iosApp/iosApp/Info.plist b/iosApp/iosApp/Info.plist index bf9db74..99c8b7b 100644 --- a/iosApp/iosApp/Info.plist +++ b/iosApp/iosApp/Info.plist @@ -4,10 +4,6 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) - UIBackgroundModes - - remote-notification - CFBundleDisplayName TrackerMap CFBundleExecutable @@ -31,6 +27,10 @@ UIApplicationSupportsMultipleScenes + UIBackgroundModes + + remote-notification + UILaunchScreen UIRequiredDeviceCapabilities -- cgit v1.2.3