Push Notification Settings
Use setPushNotificationEnabled(_:) to opt a user in or out of Pulsate push notifications. This affects only pushes that Pulsate sends. By default, all users are opted in.
Opt in / opt out
Section titled “Opt in / opt out”import PULPulsate
guard let manager = PULPulsateFactory.getDefaultInstance() else { return }
manager.setPushNotificationEnabled(true) // Opt inmanager.setPushNotificationEnabled(false) // Opt outReading the current preference
Section titled “Reading the current preference”To check whether the current user is opted in or out, use isPushNotificationEnabled():
if manager.isPushNotificationEnabled() { // User currently receives Pulsate pushes}Behavior when opted out
Section titled “Behavior when opted out”When a user is opted out of push notifications, they will not receive any push notifications from Pulsate — this includes both Campaigns and Converse Messages. Opted-out users still:
- receive In-App Notifications, and
- receive campaign feed post in the Pulsate Feed, including feed posts from push-notification campaigns.

