UnbluKeychainPreferencesStorage

public class UnbluKeychainPreferencesStorage : UnbluPreferencesStorage

When this class is passed to the CoreSDK at configuration, Unblu will store certain preferences securely in the Keychain.

  • Declaration

    Swift

    public var sharedGroupName: String? { get set }
  • Initializes the class with the given UnbluKeychainAccessControl and an optional service to associate items in the Keychain with.

    Declaration

    Swift

    public init(accessControl: UnbluKeychainAccessControl, shared: Bool? = false)

    Parameters

    accessControl

    The access control level that Unblu should store items into the Keychain using.

    shared

    we use shared container or local container

  • 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.