35 lines
904 B
Swift
35 lines
904 B
Swift
//
|
|
// nirvana_iosApp.swift
|
|
// nirvana-ios
|
|
//
|
|
// Created by Arjun Patel on 12/11/21.
|
|
//
|
|
|
|
import SwiftUI
|
|
import Firebase
|
|
import GoogleSignIn
|
|
|
|
@main
|
|
struct nirvana_iosApp: App {
|
|
@StateObject var authSessionStore: AuthSessionStore = AuthSessionStore()
|
|
|
|
@UIApplicationDelegateAdaptor private var appDelegate: AppDelegate
|
|
|
|
var body: some Scene {
|
|
WindowGroup {
|
|
ContentView().environmentObject(authSessionStore)
|
|
}
|
|
}
|
|
}
|
|
|
|
class AppDelegate: NSObject, UIApplicationDelegate {
|
|
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
|
|
FirebaseApp.configure()
|
|
return true
|
|
}
|
|
|
|
func application(_ application: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any]) -> Bool {
|
|
return GIDSignIn.sharedInstance.handle(url)
|
|
}
|
|
}
|