Closed sindresorhus closed 3 years ago
https://github.com/apple/swift-corelibs-foundation/blob/ef6f96ee82ea0f54252071c0ecadf5f01be9aecc/Foundation/UserDefaults.swift#L26-L64
Seems we could also support NSNumber and various Int* types.
NSNumber
Int*
Even arrays of values (https://github.com/sindresorhus/Defaults/issues/47).
We could also adopt the approach of using a protocol to define the natively supported types: https://www.vadimbulavin.com/advanced-guide-to-userdefaults-in-swift/
Fixed by #57
https://github.com/apple/swift-corelibs-foundation/blob/ef6f96ee82ea0f54252071c0ecadf5f01be9aecc/Foundation/UserDefaults.swift#L26-L64
Seems we could also support
NSNumber
and variousInt*
types.Even arrays of values (https://github.com/sindresorhus/Defaults/issues/47).
We could also adopt the approach of using a protocol to define the natively supported types: https://www.vadimbulavin.com/advanced-guide-to-userdefaults-in-swift/