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.
Setting the privacy level
Section titled “Setting the privacy level”import PULPulsate
guard let manager = PULPulsateFactory.getDefaultInstance() else { return }
manager.setPrivacy(.pulPrivacySubscribed) // Subscribedmanager.setPrivacy(.pulPrivacyUnsubscribed) // UnsubscribedPULPrivacyLevel is an enum with two cases: pulPrivacySubscribed and pulPrivacyUnsubscribed.
Reading the current privacy level
Section titled “Reading the current privacy level”getPrivacy() returns the raw integer value of the current level:
let level = manager.getPrivacy()// 0 == pulPrivacySubscribed, 1 == pulPrivacyUnsubscribedKey behavior
Section titled “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.

