Protect
@ProtectActor
public class Protect
The Protect class provides methods to initialize the SDK and retrieve device signal data
-
Configures the Protect SDK with the provided configuration. This method should be called before calling
initialize().Declaration
Swift
@ProtectActor public static func config(_ block: (ProtectConfig) -> Void)Parameters
blockA closure that configures the
ProtectConfig. -
initialize()AsynchronousInitializes the Protect SDK with the provided configuration. This method should be called before using any other methods in the Protect SDK.
Throws
ProtectErrorif initialization fails.Declaration
Swift
@ProtectActor public static func initialize() async throws -
data()AsynchronousRetrieves the signal data from the Protect SDK. This method should be called after
initialize()to get the data.Throws
ProtectErrorif data retrieval fails.Declaration
Swift
@ProtectActor public static func data() async throws -> StringReturn Value
A string containing the behavioral data.
-
Pause behavioral data collection
Throws
ProtectErrorif SDK is not initializedDeclaration
Swift
@ProtectActor public static func pauseBehavioralData() throws -
Resume behavioral data collection
Throws
ProtectErrorif SDK is not initializedDeclaration
Swift
@ProtectActor public static func resumeBehavioralData() throws
View on GitHub