PushNotificationsCategoryBehaviour

public protocol PushNotificationsCategoryBehaviour : NotificationsSubcategoryBehaviour

Defines the behaviour of the Push Notifications category that clients will use

  • Associates a given user ID with the current device

    Declaration

    Swift

    func identifyUser(userId: String, userProfile: UserProfile?) async throws

    Parameters

    userId

    The unique identifier for the user

    userProfile

    Additional specific data for the user

  • Registers the given APNs token for this device, allowing it to receive Push Notifications

    Declaration

    Swift

    func registerDevice(apnsToken: Data) async throws

    Parameters

    apnsToken

    A globally unique token that identifies this device to APNs

  • Records that a notification has been received.

    Declaration

    Swift

    func recordNotificationReceived(_ userInfo: Notifications.Push.UserInfo) async throws

    Parameters

    userInfo

    A dictionary that contains information related to the remote notification

  • Records that a notification was opened, i.e. the user tapped on it

    Declaration

    Swift

    func recordNotificationOpened(_ response: UNNotificationResponse) async throws

    Parameters

    response

    The user’s response to the notification