Privacy Settings

Toggle a user between subscribed and unsubscribed communication states with setPrivacy.

The Pulsate iOS SDK lets you control a user's communication preference through a privacy level. Use setPrivacy(_:) on PULPulsateManager to switch a user between subscribed and unsubscribed states.

Setting the privacy level

import PULPulsate

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

manager.setPrivacy(.pulPrivacySubscribed)    // Subscribed
manager.setPrivacy(.pulPrivacyUnsubscribed)  // Unsubscribed

PULPrivacyLevel is an enum with two cases: pulPrivacySubscribed and pulPrivacyUnsubscribed.

Reading the current privacy level

getPrivacy() returns the raw integer value of the current level:

let level = manager.getPrivacy()
// 0 == pulPrivacySubscribed, 1 == pulPrivacyUnsubscribed

🚧

Important

Changes are debounced — the SDK waits up to ~60 seconds before syncing a new privacy level to the backend.

Key behavior

When a user is marked unsubscribed, they are still subject to location-based tracking (geofences) and segment data collection, but they will not be sent any campaigns or messages from Pulsate. This lets you continue collecting analytics while respecting a user's opt-out of direct communications.