Pulsate 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.
Showing the Feed
Section titled “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
Section titled “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()
