aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsidro Henoch <imhenoch@protonmail.com>2022-02-12 18:33:50 -0600
committerIsidro Henoch <imhenoch@protonmail.com>2022-02-12 18:33:50 -0600
commit754ffab4829ec20e71c0f753bb9c6fc5b42ca196 (patch)
treeaa03e1a72b93ca67786a8160f770e9946db18c85
parente58ceb3d9f7d4a0d497d5957d3fc21cef9ca554b (diff)
downloadetbsa-trackermap-mobile-754ffab4829ec20e71c0f753bb9c6fc5b42ca196.tar.gz
etbsa-trackermap-mobile-754ffab4829ec20e71c0f753bb9c6fc5b42ca196.tar.bz2
etbsa-trackermap-mobile-754ffab4829ec20e71c0f753bb9c6fc5b42ca196.zip
Fixes the issue with Firebase not initializing
-rw-r--r--iosApp/iosApp/AppDelegate.swift5
-rw-r--r--iosApp/iosApp/iOSApp.swift2
2 files changed, 5 insertions, 2 deletions
diff --git a/iosApp/iosApp/AppDelegate.swift b/iosApp/iosApp/AppDelegate.swift
index ebe88df..4233910 100644
--- a/iosApp/iosApp/AppDelegate.swift
+++ b/iosApp/iosApp/AppDelegate.swift
@@ -21,7 +21,8 @@ import Firebase
import FirebaseMessaging
class AppDelegate: NSObject, UIApplicationDelegate {
- func applicationDidFinishLaunching(_ application: UIApplication) {
+ func application(_ application: UIApplication,
+ didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
FirebaseApp.configure()
Messaging.messaging().delegate = self
@@ -30,6 +31,8 @@ class AppDelegate: NSObject, UIApplicationDelegate {
UNUserNotificationCenter.current().requestAuthorization(options: authOptions) { _, _ in }
application.registerForRemoteNotifications()
+
+ return true
}
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) async -> UIBackgroundFetchResult {
diff --git a/iosApp/iosApp/iOSApp.swift b/iosApp/iosApp/iOSApp.swift
index 291f2cd..763e0e2 100644
--- a/iosApp/iosApp/iOSApp.swift
+++ b/iosApp/iosApp/iOSApp.swift
@@ -21,7 +21,7 @@ import shared
@main
struct iOSApp: App {
- @UIApplicationDelegateAdaptor var delegate: AppDelegate
+ @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
init() {
/* Dependency injections */