Use interactive notifications to add buttons to push notifications from your mobile app. Marketing Cloud sends the category name for these interactive notifications in the message payload.

  1. To set up interactive notifications for your app, use the Implementation sample code as a guide and modify for your situation.

    The sample code applies to the AppDelegate.m didFinishLaunchingWithOptions application delegate mention. The sample code shows how to create a category named “Example”. When you send this category with the payload from Marketing Cloud, the notification displays in the notification center with buttons.

  2. To check if your action triggered and to take action, examine the push notification’s payload in your push handler. Use the Handle Action sample code as a guide.
  3. After setup, ask the marketer to enable interactive notifications on the MobilePush Administration page in Marketing Cloud.

Example: Implementation

Example: Handle Action

In your push handler, examine the push notification’s payload to see if your action triggered and if your application performed the action.