sunshinejr / SwiftyUserDefaults

Modern Swift API for NSUserDefaults
http://radex.io/swift/nsuserdefaults/static
MIT License
4.84k stars 364 forks source link

Fix value upgraded from version 3 #289

Open azone opened 2 years ago

azone commented 2 years ago

Version 3 of SwiftyUserDefaults saved Array<String|Int|Float|Double...> as Array in UserDefaults, if upgrade it to version 4 or 5.x, the value will be saved as Codable. Then the values will be lost in the new version.

azone commented 2 years ago

@sunshinejr could you review this, please?

azone commented 2 years ago

Version 3 of SwiftyUserDefaults saved Array<String|Int|Float|Double...> as Array in UserDefaults, if upgrade it to version 4 or 5.x, the value will be saved as Codable. Then the values will be lost in the new version.

Another situation is: the developer used UserDefaults directly before, and now is using SwiftyUserDefaults.

azone commented 3 months ago

Why hasn't this pr been reviewed yet?

The author does not maintain it anymore, see this: #294