-
Adds the contents of the specified dictionary to the registration domain.
Declaration
Swift
@StorageActor func register(defaults registration: [StoreKey : Any])Parameters
defaultsThe dictionary of keys and values you want to register.
-
Returns the generic value associated with the specified
StoreKey.Declaration
Swift
@StorageActor func value<V>(forKey key: StoreKey) -> V?Parameters
keyA
StoreKeyin storage. -
Returns the
Decodableassociated with the specifiedStoreKey.Declaration
Swift
@StorageActor func decodable<D>(forKey key: StoreKey) -> D? where D : DecodableParameters
keyA
StoreKeyin storage. -
Returns the
StorageDataassociated with the specifiedStoreKey.Declaration
Swift
@StorageActor func data<D>(forKey key: StoreKey) -> D? where D : StorageDataParameters
keyA
StoreKeyin storage. -
Returns the
Stringassociated with the specifiedStoreKey.Declaration
Swift
@StorageActor func string(forKey key: StoreKey) -> String?Parameters
keyA
StoreKeyin storage. -
Returns the
[Any]associated with the specifiedStoreKey.Declaration
Swift
@StorageActor func array(forKey key: StoreKey) -> [Any]?Parameters
keyA
StoreKeyin storage. -
Returns the
Set<AnyHashable>associated with the specifiedStoreKey.Declaration
Swift
@StorageActor func set(forKey key: StoreKey) -> Set<AnyHashable>?Parameters
keyA
StoreKeyin storage. -
Returns the
[String: Any]associated with the specifiedStoreKey.Declaration
Swift
@StorageActor func dictionary(forKey key: StoreKey) -> [String : Any]?Parameters
keyA
StoreKeyin storage. -
Returns the
[String]associated with the specifiedStoreKey.Declaration
Swift
@StorageActor func stringArray(forKey key: StoreKey) -> [String]?Parameters
keyA
StoreKeyin storage. -
Returns the
Intassociated with the specifiedStoreKey.Declaration
Swift
@StorageActor func integer(forKey key: StoreKey) -> IntParameters
keyA
StoreKeyin storage. -
Returns the
Floatassociated with the specifiedStoreKey.Declaration
Swift
@StorageActor func float(forKey key: StoreKey) -> FloatParameters
keyA
StoreKeyin storage. -
Returns the
Doubleassociated with the specifiedStoreKey.Declaration
Swift
@StorageActor func double(forKey key: StoreKey) -> DoubleParameters
keyA
StoreKeyin storage. -
Returns the
Boolassociated with the specifiedStoreKey.Declaration
Swift
@StorageActor func bool(forKey key: StoreKey) -> BoolParameters
keyA
StoreKeyin storage. -
Returns the
URLassociated with the specifiedStoreKey.Declaration
Swift
@StorageActor func url(forKey key: StoreKey) -> URL?Parameters
keyA
StoreKeyin storage. -
Sets the value of the specified
StoreKeyto the specifiedInt.Declaration
Swift
@StorageActor func set(_ value: Int, forKey key: StoreKey)Parameters
valueIntto store.keyThe
StoreKeywith which to associate the value. -
Sets the value of the specified
StoreKeyto the specifiedFloat.Declaration
Swift
@StorageActor func set(_ value: Float, forKey key: StoreKey)Parameters
valueFloatto store.keyThe
StoreKeywith which to associate the value. -
Sets the value of the specified
StoreKeyto the specifiedDouble.Declaration
Swift
@StorageActor func set(_ value: Double, forKey key: StoreKey)Parameters
valueDoubleto store.keyThe
StoreKeywith which to associate the value. -
Sets the value of the specified
StoreKeyto the specifiedBool.Declaration
Swift
@StorageActor func set(_ value: Bool, forKey key: StoreKey)Parameters
valueBoolto store.keyThe
StoreKeywith which to associate the value. -
Sets the value of the specified
StoreKeyto the specifiedURL.Declaration
Swift
@StorageActor func set(_ url: URL?, forKey key: StoreKey)Parameters
urlURLto store.keyThe
StoreKeywith which to associate the value. -
Sets the value of the specified
StoreKeyto the specifiedString.Declaration
Swift
@StorageActor func set(_ string: String, forKey key: StoreKey)Parameters
stringStringto store.keyThe
StoreKeywith which to associate the value. -
Sets the value of the specified
StoreKeyto the specified generic value.Declaration
Swift
@StorageActor func set(_ value: (some Any)?, forKey key: StoreKey)Parameters
valueGeneric value to store.
keyThe
StoreKeywith which to associate the value. -
Sets the value of the specified
StoreKeyto the specifiedEncodable.Declaration
Swift
@StorageActor func set(encodable: Encodable?, forKey key: StoreKey)Parameters
encodableEncodableto store.keyThe
StoreKeywith which to associate the value. -
Sets the value of the specified
StoreKeyto the specifiedStorageData.Declaration
Swift
@StorageActor func set(_ data: (some StorageData)?, forKey key: StoreKey)Parameters
dataStorageDatato store.keyThe
StoreKeywith which to associate the value. -
Removes the value of the specified
StoreKey.Declaration
Swift
@StorageActor func remove(forKey key: StoreKey)Parameters
keyThe
StoreKeywhose value you want to remove.
View on GitHub
Install in Dash