UnbluKeychainPreferencesStorage
public class UnbluKeychainPreferencesStorage : UnbluPreferencesStorage
When this class is passed to the CoreSDK at configuration, Unblu will store certain preferences securely in the Keychain.
-
Initializes the class with the given
UnbluKeychainAccessControl
and an optional service to associate items in the Keychain with.Declaration
Swift
public init(accessControl: UnbluKeychainAccessControl, service: String? = nil)
Parameters
accessControl
The access control level that Unblu should store items into the Keychain using.
service
The service to associate any items stored by Unblu. If you pass nil, Unblu will use a default value.
-
Stores the given value into the Keychain with the given key
Declaration
Swift
public func put(key: String, value: String?)
Parameters
key
The key to store the value in the Keychain
value
The value for the given key
-
Returns the value for the given key from the Keychain
Declaration
Swift
public func get(key: String) -> String?
Parameters
key
The key to retrieve from the Keychain
Return Value
The value for the given key stored in the Keychain.
nil
if there is no value found.