Tracking Push Notification Taps
By the end of this guide, you should see the following result: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.
1. Submitting push notification click counts
If your AppDelegate inherits from MindboxAppDelegate - no additional setup is required. Push notification tap handling is already implemented in the SDK: userNotificationCenter(_:didReceive:withCompletionHandler:) already calls Mindbox.shared.pushClicked(...).
When overriding userNotificationCenter(_:didReceive:withCompletionHandler:), make sure to call super.userNotificationCenter(...).
If you are not using MindboxAppDelegate, you need to pass the push notification tap event to the SDK.
In AppDelegate, locate or add the following method:
import Mindbox
import UIKit
class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate {
func userNotificationCenter(
_ center: UNUserNotificationCenter,
didReceive response: UNNotificationResponse,
withCompletionHandler completionHandler: @escaping () -> Void
) {
Mindbox.shared.pushClicked(response: response)
completionHandler()
}
}2. 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.
Check your results:You can send a mobile push notification from Maestra and it is displayed on the target device. Once a notification is tapped, its system status changes to "Clicked."
Use this guide to verify that click events are being received.
Updated 7 months ago

