Skip to content

Instantly share code, notes, and snippets.

@aheze
Last active April 25, 2022 13:43
Show Gist options
  • Save aheze/6998b4bae660c8dade8ba6a75687772c to your computer and use it in GitHub Desktop.
Save aheze/6998b4bae660c8dade8ba6a75687772c to your computer and use it in GitHub Desktop.
import SwiftUI
class AppDelegate: NSObject, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
/// your push notification code goes here
return true
}
}
@main
struct HelloWorldApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment