Fix Firebase initialization
This commit is contained in:
parent
e65ccc5de7
commit
eb50266745
2 changed files with 5 additions and 10 deletions
|
@ -6,6 +6,7 @@
|
||||||
// Copyright © 2021 William Brawner. All rights reserved.
|
// Copyright © 2021 William Brawner. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
import FirebaseCore
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
import TwigsCore
|
import TwigsCore
|
||||||
|
|
||||||
|
@ -18,4 +19,8 @@ struct TwigsApp: App {
|
||||||
MainView(apiService as TwigsApiService)
|
MainView(apiService as TwigsApiService)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
init() {
|
||||||
|
FirebaseApp.configure()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,20 +6,10 @@
|
||||||
// Copyright © 2021 William Brawner. All rights reserved.
|
// Copyright © 2021 William Brawner. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
import FirebaseCore
|
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
import TwigsCore
|
import TwigsCore
|
||||||
|
|
||||||
class AppDelegate: NSObject, UIApplicationDelegate {
|
|
||||||
func application(_ application: UIApplication,
|
|
||||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
|
|
||||||
FirebaseApp.configure()
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
struct MainView: View {
|
struct MainView: View {
|
||||||
@UIApplicationDelegateAdaptor(AppDelegate.self) var delegate
|
|
||||||
@StateObject var dataStore: DataStore
|
@StateObject var dataStore: DataStore
|
||||||
let apiService: TwigsApiService
|
let apiService: TwigsApiService
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue