PushNotifications
@objcMembers
public final class PushNotifications : NSObject
Undocumented
-
Fired for a valid Rezolve AI push notification received in the foreground
Declaration
Swift
public var onNotificationReceived: ((PushPayload) -> Void)? -
Fired when the user taps a valid Rezolve AI push notification from the background
Declaration
Swift
public var onNotificationClicked: ((PushPayload) -> Void)? -
Registers the device token for push notifications. This method should be called from the AppDelegate’s didRegisterForRemoteNotificationsWithDeviceToken method
Declaration
Swift
public func register(_ deviceToken: Data)Parameters
deviceTokenThe device token received from APNs. If the project ID is already set, it will register the token with BDPointEngine immediately. Otherwise, it will save the token and set pendingRegistration to true, so that it can be registered later when the project ID becomes available.
-
Notification arrives while app is in foreground Should be called from the AppDelegate’s userNotificationCenter:willPresent:withCompletionHandler: method when a notification is received while the app is in the foreground. It allows the SDK to handle the notification and determine whether it should be presented to the user or not
Declaration
Swift
public func handleForeground(_ notification: UNNotification) -> Bool -
The callback is called when a user clicked the push notification that arrived while the app was on background Should be called from the AppDelegate’s userNotificationCenter:didReceive:withCompletionHandler: method when a notification is received when a user clicked on the push notification It allows the SDK to handle the notification and determine whether it should be presented to the user or not
Declaration
Swift
public func handleResponse(_ notificationResponse: UNNotificationResponse)
View on GitHub
Install in Dash