AppMain.swift 500 B

123456789101112131415161718192021222324252627
  1. //
  2. // ntfyApp.swift
  3. // ntfy
  4. //
  5. // Created by Philipp Heckel on 5/13/22.
  6. //
  7. import SwiftUI
  8. import Firebase
  9. @main
  10. struct AppMain: App {
  11. @UIApplicationDelegateAdaptor(AppDelegate.self) var delegate: AppDelegate
  12. @StateObject private var store = Store.shared
  13. init() {
  14. FirebaseApp.configure()
  15. }
  16. var body: some Scene {
  17. WindowGroup {
  18. ContentView()
  19. .environment(\.managedObjectContext, store.container.viewContext)
  20. }
  21. }
  22. }