Move firebase initialisation from appdelegate didFinishLaunchingWithOptionsto Corecontext init, which is called earlier

This commit is contained in:
QuentinArguillere 2024-02-26 18:05:19 +01:00
parent fd9ede62f8
commit ea1420356d
2 changed files with 9 additions and 6 deletions

View file

@ -26,6 +26,10 @@ import Combine
import UniformTypeIdentifiers
import Network
#if USE_CRASHLYTICS
import Firebase
#endif
final class CoreContext: ObservableObject {
static let shared = CoreContext()
@ -67,6 +71,9 @@ final class CoreContext: ObservableObject {
func initialiseCore() throws {
#if USE_CRASHLYTICS
FirebaseApp.configure()
#endif
coreQueue.async {
LoggingService.Instance.logLevel = LogLevel.Debug

View file

@ -18,18 +18,14 @@
*/
import SwiftUI
#if USE_CRASHLYTICS
import Firebase
#endif
import linphonesw
let accountTokenNotification = Notification.Name("AccountCreationTokenReceived")
class AppDelegate: NSObject, UIApplicationDelegate {
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
#if USE_CRASHLYTICS
FirebaseApp.configure()
#endif
return true
}