SingletonStorageDelegate
open class SingletonStorageDelegate : StorageDelegate
SingletonStorageDelegate
conforming StorageDelegate
protocol.
-
Create a
SingletonStorageDelegate
.Declaration
Swift
public init()
-
Get
StorageData
forStoreKey
from the keychain.Declaration
Swift
open func data<D>(forKey key: StoreKey) -> D? where D : StorageData
Parameters
key
StoreKey
to store theStorageData
.Return Value
StorageData
forStoreKey
. -
Set
StorageData
forStoreKey
in the keychain.Declaration
Swift
open func set<D>(_ data: D?, forKey key: StoreKey) where D : StorageData
Parameters
data
StorageData
to store.key
StoreKey
to store theStorageData
. -
Remove
StorageData
forStoreKey
from the keychain.Declaration
Swift
open func remove(forKey key: StoreKey)
Parameters
key
StoreKey
to remove.