LocalStorageService
struct LocalStorageService
A service for storing and retrieving data from UserDefaults
-
A key for storing and retrieving data from UserDefaults
See moreDeclaration
Swift
enum Key : String
-
Get a value from UserDefaults
Declaration
Swift
func get<T>(_ key: Key) -> T? where T : Decodable
-
Set a value in UserDefaults
Declaration
Swift
func set(_ key: Key, _ value: some Encodable)
-
Remove a value from UserDefaults
Declaration
Swift
func remove(_ key: Key)