UnbluPreferencesStorage
public protocol UnbluPreferencesStorage
protocol which can be implemented to store the preferences of Unblu at a custom location.
This is useful if encryption should used. Otherwise a default implementation can be used by creating a UserDefaultsPreferencesStorage.
IMPORTANT: if you change the custom storage, please be aware that you are somehow capable of migrating the old data to the new storage.
-
A preference should be stored in the storage
Declaration
Swift
func put(key: String, value: String?)Parameters
keyThe key of the preference
valueThe value for the given key
-
A preference should be read from the storage
Declaration
Swift
func get(key: String) -> String?Parameters
keyThe key of the preference
Return Value
The value for the given key. Can be nil if there is no value stored for this key.
UnbluPreferencesStorage Protocol Reference