Register for remote notifications For iOS 12 or higher display notification (sent via APNS) I just need to add the below code, right?
let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound]
UNUserNotificationCenter.current().requestAuthorization(
options: authOptions,
completionHandler: {_, _ in })
application.registerForRemoteNotifications()
No need if-else like the example for iOS 10: https://github.com/firebase/quickstart-ios/blob/365e43642f2cc570df004cb16e098a76cde1e5b1/messaging/MessagingExampleSwift/AppDelegate.swift#L40-L55