How to handle Push Notifications in SwiftUI’s New App Lifecycle?
Xcode 12 — iOS 14
2 min readJul 5, 2020
With Xcode 12, Apple have introduced new SwiftUI app life cycle. Which looks something like following:
@main
struct ProjectName: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
In this tutorial you will learn how to manage push with above app life cycle:
- Ask for Push permission
- Get Push Token
- Handle Notification taps