pi-remote-ios/Sources/App/piRemoteApp.swift

20 lines
517 B
Swift

import SwiftUI
import UserNotifications
@main
struct piRemoteApp: App {
@StateObject private var appState = AppState.shared
@StateObject private var notificationDelegate = NotificationDelegate.shared
var body: some Scene {
WindowGroup {
ContentView()
.environmentObject(appState)
.onAppear {
notificationDelegate.setup()
UIApplication.shared.registerForRemoteNotifications()
}
}
}
}