Handle push tokens
Register for push notifications
Register APNs and FCM
The example below shows a typical iOS setup:
Configure Firebase.
Request notification permissions.
Register with APNs.
Provide the APNs token to Firebase Messaging.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// ...
// Use Firebase library to configure APIs
FirebaseApp.configure()
// Register user notification
let settings: UIUserNotificationSettings = UIUserNotificationSettings(types: [.alert, .badge, .sound], categories: nil)
application.registerUserNotificationSettings(settings)
// Firebase register
Messaging.messaging().delegate = self
// Register for Remote Notification
application.registerForRemoteNotifications()
return true
}Update the push token in NFC Wallet
The push token can change (for example, after an app reinstall or when Firebase refreshes the token). When this happens, your digital wallet application must notify the NFC Wallet SDK by calling NotificationService.updatePushToken.
Last updated
Was this helpful?