Sending Push Notification Tap Events to the CDP
Make sure these steps are completed successfully:
Expected result of the āIOS | Setting Up Rich Push Notificationsā step:The push notification should be sent to your device, and tapping it should update the status in Maestra to Clicked.
Use this guide to verify that click events are being received.
If you used
MindboxFlutterAppDelegatein theAppDelegate.swiftfile, you can proceed directly to testing push notifications, as all the required methods are already implemented.
If youāre not using MindboxAppDelegate, youāll need to manually pass the click event to the SDK. Open AppDelegate and add a call to the pushClicked method.
import UIKit
import Flutter
import Mindbox
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func userNotificationCenter(
_ center: UNUserNotificationCenter,
didReceive response: UNNotificationResponse,
withCompletionHandler completionHandler: @escaping () -> Void
) {
Mindbox.shared.pushClicked(response: response)
completionHandler()
}
}App navigation
By default, tapping a push notification simply opens the app (usually to the home screen).
If you need to redirect the user to a specific screen, youāll need to implement custom navigation logic.
The SDK does not provide built-in routing.
Updated 7 months ago

