KeychainSettings
A collection of storage-backed key-value data
This class allows storage of values with the Int, Long, String, Float, Double, or Boolean types, using a String reference as a key. Values will be persisted across app launches.
The specific persistence mechanism is defined using a platform-specific implementation, so certain behavior may vary across platforms. In general, updates will be reflected immediately in-memory, but will be persisted to disk asynchronously.
Operator extensions are defined in order to simplify usage. In addition, property delegates are provided for cleaner syntax and better type-safety when interacting with values stored in a Settings
instance.
The KeychainSettings implementation saves data to the Apple keychain. Data is saved using the generic password type, where keys are account names and values are treated as passwords. The value passed to the String
constructor will be used as the service name. It's also possible to pass custom key-value pairs as attributes that will be added to every key, if the default behavior does not fit your needs.