UAPrivacyManager
@objc
public final class UAPrivacyManager : NSObject, Sendable
The privacy manager allow enabling/disabling features in the SDK.
The SDK will not make any network requests or collect data if all features are disabled, with
a few exceptions when going from enabled -> disabled. To have the SDK opt-out of all features on startup,
set the default enabled features in the Config to an empty option set, or in the
airshipconfig.plist file with enabledFeatures = none
.
If any feature is enabled, the SDK will collect and send the following data:
- Channel ID
- Locale
- TimeZone
- Platform
- Opt in state (push and notifications)
- SDK version
- Accengage Device ID (Accengage module for migration)
-
The current set of enabled features.
Declaration
Swift
@objc(enabledFeatures) public var enabledFeatures: UAFeature { get set }
-
Enables features. This will append any features to the
enabledFeatures
property.Declaration
Swift
@objc(enableFeatures:) public func enableFeatures(_ features: UAFeature)
Parameters
features
The features to enable.
-
Disables features. This will remove any features to the
enabledFeatures
property.Declaration
Swift
@objc(disableFeatures:) public func disableFeatures(_ features: UAFeature)
Parameters
features
The features to disable.
-
Checks if a given feature is enabled.
Declaration
Swift
@objc(isEnabled:) public func isEnabled(_ features: UAFeature) -> Bool
Parameters
features
The features to check.
Return Value
True if the provided features are enabled, otherwise false.
-
Checks if any feature is enabled.
Declaration
Swift
@objc public func isAnyFeatureEnabled() -> Bool
Return Value
true
if a feature is enabled, otherwisefalse
.