sunshinejr / SwiftyUserDefaults

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

Xcode 13, swift 5.6 , simple codable struct model always show Type 'User' does not conform to protocol 'DefaultsSerializable' #292

Open zangqilong198812 opened 2 years ago

zangqilong198812 commented 2 years ago
截屏2022-04-28 11 17 40

I use cocoapods install SwiftyUserDefaults, and the version is 5.3 I'm really confused. but If i implementation the DefaultsSerializable, it works.

截屏2022-04-28 11 19 23
absolutvodka8888 commented 2 years ago

// Xcode 13.3.1 require

extension UserCodable: DefaultsSerializable {
    static var _defaults: DefaultsCodableBridge<UserCodable>
    { return DefaultsCodableBridge<UserCodable>() }

    static var _defaultsArray: DefaultsCodableBridge<[UserCodable]>
    { return  DefaultsCodableBridge<[UserCodable]>()}
}
bardonadam commented 2 years ago

I have the same issue. This isn't required in the earlier XCode versions...

ShoMasegi commented 2 years ago

👀 https://github.com/sunshinejr/SwiftyUserDefaults/issues/285