Use the SDK to easily incorporate inbox functionality into your mobile app. All active inbox messages download to the mobile device each time the app is brought to the foreground.

Marketers can create an Inbox Only message to deliver the message silently to the inbox or an Inbox+Alert message to include a push notification with the inbox message.

Implement Inbox Functionality

Find convenience methods for refreshing the inbox and getting, reading, and deleting messages in InboxMessages Methods.

To display inbox-only messages sent from Marketing Cloud, use the UITableView datasource provided by the SDK in a UIViewController. Your UIViewController creates an inbox in your app to display these messages. The SDK adds messages to the datasource after they are downloaded.

Manage the selection of rows in your tableview using the basic UITableView delegate provided by the SDK. Otherwise, your app must implement a UITableView delegate.

Example: Inbox Implementation

This example includes a simple implementation of an inbox using the SDK as the datasource and delegate.

For additional control, presentation, and usability, implement your own datasource and delegate using the support offered by the SDK.

Use Case

Sort Inbox Messages by Sent Date

To sort inbox messages in your custom inbox implementation, use the value of sendDateUtc from the inbox message returned by sfmc_getAllMessages and other getters.

To sort your UITableView data source array of Inbox messages, use an NSSortDescriptor for the key sendDateUtc. Sort your data source array with this descriptor, and then reload your UITableView.