Pulsate Feed

Present the Pulsate Feed/Inbox in your app and dismiss an auto-opened feed.

One of the core parts of the Pulsate SDK is the Pulsate Feed. The Feed is a fully featured interface that sits directly within your app and renders incoming campaigns to your customers. This page shows how to present the Feed and how to dismiss a feed that Pulsate opened automatically.

📘

Before you begin

Make sure you have completed Running the Pulsate SDK — you need an initialized manager (import PULPulsate) before presenting the Feed.

Showing the Feed

To show the Feed / Inbox, get the Feed navigation controller from the manager and present it. getFeedNavigationController(completion:) returns a UINavigationController?, so unwrap it before presenting:

import PULPulsate

guard let manager = PULPulsateFactory.getDefaultInstance() else { return }

let feed = manager.getFeedNavigationController {
    // Runs when the user exits the Feed.
    // Good place to refresh and display your badge counter.
}

if let feed = feed {
    present(feed, animated: true)
}

The completion closure is invoked when the user exits the Feed. If you need any custom logic to run after the Feed closes — for example refreshing and displaying the badge counter in your app — this is where to place it.

The Feed can be closed by tapping the back button.

The list of messages is fetched from the Pulsate server and cached locally for offline reading. Pulsate also offers campaign distribution so you can send custom campaigns via the message inbox.

Dismissing an Auto-Opened Feed

When a push or campaign opens the Feed automatically, you can dismiss it programmatically:

guard let manager = PULPulsateFactory.getDefaultInstance() else { return }
manager.closeAutomaticallyOpenedFeed()

❗️

Feed orientation

The Pulsate Feed is designed with Portrait mode in mind. We highly recommend using it in Portrait mode exclusively. Landscape mode is possible, but not recommended for the best UX.

Next steps