pushdeer/ios/PushDeer-iOS/PushDeer/PushDeerApp.swift

24 lines
485 B
Swift
Raw Normal View History

2021-12-27 22:33:27 +08:00
//
// PushDeerApp.swift
// PushDeer
//
// Created by HEXT on 2021/12/25.
//
import SwiftUI
@main
struct PushDeerApp: App {
2022-01-04 22:28:18 +08:00
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
let store = AppState.shared
let persistenceController = PersistenceController.shared
2022-01-04 22:28:18 +08:00
2021-12-27 22:33:27 +08:00
var body: some Scene {
WindowGroup {
ContentView()
.environmentObject(store)
.environment(\.managedObjectContext, persistenceController.container.viewContext)
2021-12-27 22:33:27 +08:00
}
}
}