Overview
Push Payload Details in iOS describe the data exposed by the Mapp Engage SDK when a remote notification is received or a rich-content notification is opened. Conform to AppoxeeNotificationDelegate on the Appoxee shared instance to react to push events and access the parsed payload.
Use Case
Purpose:
Access and process push notification payloads for dynamic app behaviour.
Track user interaction with custom push action buttons.
Benefits:
Drive in-app behaviour from server-side message metadata.
Inspect rich-content payloads when the user opens a Rich Push.
Implementation Details
Conform to
AppoxeeNotificationDelegate: The delegate is set onAppoxee.shared()(typically yourAppDelegate). Both selectors begin withappoxee:— there is noAppoxeeManager-prefixed selector.class AppDelegate: UIResponder, UIApplicationDelegate, AppoxeeNotificationDelegate { func appoxee(_ appoxee: Appoxee, handledRemoteNotification pushNotification: APXPushNotification, andIdentifer actionIdentifier: String) { print("Push notification received: \(pushNotification) (action: \(actionIdentifier))") } func appoxee(_ appoxee: Appoxee, handledRichContent richMessage: APXRichMessage, didLaunchApp didLaunch: Bool) { print("Rich message opened (didLaunch=\(didLaunch)): \(richMessage)") } }@interface AppDelegate () <AppoxeeNotificationDelegate> @end @implementation AppDelegate - (void)appoxee:(Appoxee *)appoxee handledRemoteNotification:(APXPushNotification *)pushNotification andIdentifer:(NSString *)actionIdentifier { NSLog(@"Push notification received: %@ (action: %@)", pushNotification, actionIdentifier); } - (void)appoxee:(Appoxee *)appoxee handledRichContent:(APXRichMessage *)richMessage didLaunchApp:(BOOL)didLaunch { NSLog(@"Rich message opened (didLaunch=%d): %@", didLaunch, richMessage); } @endWarning:
The selector
appoxee:handledRemoteNotification:andIdentifer:contains a typo (Identiferwithout the secondi) in the public header. Use the selector exactly as shown.APXPushNotificationproperties: The notification object passed to the delegate exposes the parsed APNs payload.alert,title,subtitle,body— Standard alert fields.badge— Numeric badge value.uniqueID— Mapp-side identifier of the push.extraFields— Dictionary of custom key/value pairs sent with the push.didLaunchApp—BOOLindicating whether the app was launched from a terminated state by this push.isRich,isSilent,isTriggerUpdate— Flags describing the push type.pushAction—APXPushNotificationActiondescribing the configured action(s) on the push, including the button list (APXPushNotificationActionButton) and per-button action (APXPushNotificationActionButtonAction).
Action button enum:
APXPushNotificationActionButtonActiondescribes what each button does (for examplekAPXPushNotificationActionButtonActionTodoSet,kAPXPushNotificationActionButtonActionTodoOpenURL,kAPXPushNotificationActionButtonActionTodoDialNumber). Branch on the button's action to drive in-app behaviour.
Keep in mind:
Test the delegate in foreground, background, and terminated states. The
didLaunchAppflag distinguishes "opened from terminated" from "received while running".Silent pushes (
isSilent) and trigger updates (isTriggerUpdate) do not present an alert to the user. Use them to drive background work, not UI updates.For the corresponding inbox/rich-content data model, see Inbox SDK.