Skip to main content

Push Notifications

Register Device Token​

B2MAnalytics.shared.registerDeviceToken(deviceToken)

Call this from didRegisterForRemoteNotificationsWithDeviceToken. Safe to call on every launch: an unchanged token is a no-op.

Track a Push Open​

B2MAnalytics.shared.trackPushOpened(userInfo:
response.notification.request.content.userInfo)

The notification payload's fields become the event's properties directly.