Skip to content

Privacy Settings

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.

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.

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

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

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.