SDK Version
- General Messaging: Supported from version 9.13.0
- Background Updates (Self handled): Supported from version 10.10.0
Track Notification Received
Call SDK’s logNotificationReceived(withPayload: ) function to track notification received impression as shown below.Track Notification Click
To track the notification clicked event using the payload, call the SDK’s logNotificationClicked function, as shown below.NoteTo use above functions, Appdelegate swizzling should be disabled. To see how to disable swizzling, please see the link.
Validate if the notification belongs to MoEngage
Call SDK’s isPushFromMoEngage(withPayload:) function to validate if the notification belongs to MoEngage as shown below:Handling Background Updates (Self-Handled)
Prerequisites for iOS Background Updates
- Background Modes: You must enable Remote notifications under the Signing & Capabilities tab in Xcode.
- Payload Identifier: The SDK identifies these payloads by checking for
nt: sh_binside themoeFeaturesdictionary.
Implementation NoteBackground updates must be handled in the
didReceiveRemoteNotification fetch completion handler. You must also call logNotificationReceived manually to ensure these silent events are recorded in your analytics.