In-App Notification Settings

Enable or disable in-app notifications, defer and re-show them, and adjust the small in-app display duration.

The Pulsate iOS SDK gives you fine-grained control over in-app notification behavior on PULPulsateManager — whether they show, how long small in-app messages stay on screen, and how to defer and later re-show a message.

Enabling and disabling in-app notifications

In-app notifications are enabled by default. Toggle them with enable(inAppNotification:):

import PULPulsate

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

manager.enable(inAppNotification: true)   // Enable
manager.enable(inAppNotification: false)  // Disable

Read the current preference with isInAppNotificationEnabled():

if manager.isInAppNotificationEnabled() {
    // In-app notifications will be shown
}

Deferring and re-showing a notification

A common pattern is to suppress in-app notifications until the user has authenticated, then re-show the most recent one. Use showLastInAppNotification(_:) after re-enabling:

// Before login — suppress in-app notifications
manager.enable(inAppNotification: false)

// After login — re-enable and re-show the last message
manager.enable(inAppNotification: true)
manager.showLastInAppNotification()

// Pass true to force re-showing even if already shown
manager.showLastInAppNotification(true)

Adjusting the small in-app display duration

Small in-app notifications display for 12 seconds by default. Change this with setSmallInAppNotificationDuration(_:) (in seconds), and read the current value with getSmallInAppNotificationDuration():

manager.setSmallInAppNotificationDuration(30)   // Show for 30 seconds
let seconds = manager.getSmallInAppNotificationDuration()

These options let you tune in-app notification presentation and timing to fit your app's flow.