UserPreference now can have published defaultValue

better approach

improved and added tests
This commit is contained in:
Mauro Romito
2025-03-20 20:35:11 +01:00
committed by Mauro
parent d9196b2fa1
commit edcc5d17c8
5 changed files with 75 additions and 46 deletions

View File

@@ -55,6 +55,7 @@ final class AppSettings {
}
private static var suiteName: String = InfoPlistReader.main.appGroupIdentifier
private static var remoteSuiteName = "\(InfoPlistReader.main.appGroupIdentifier).remote"
/// UserDefaults to be used on reads and writes.
private static var store: UserDefaults! = UserDefaults(suiteName: suiteName)