Closed kasyanov-ms closed 7 years ago
When I have to inject UserDefaults, I do the following:
protocol UserDefaultsType { func object(forKey defaultName: String) -> Any? func set(_ value: Any?, forKey defaultName: String) } extension UserDefaults: UserDefaultsType { }
Are there any good practices to accomplish the same for SwiftyUserDefaults?
Check this out: https://twitter.com/johnsundell/status/855713943809032192
When I have to inject UserDefaults, I do the following:
Are there any good practices to accomplish the same for SwiftyUserDefaults?