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

18 lines
416 B
Swift

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