CodableLocal 1.0.0

CodableLocal 1.0.0

Johan Hernandez 管理。



CodableLocal

Version License Platform

示例

UserDefaults+Codable

struct UserInfo : Codable {
  let userId: String
}

...

let defaults = UserDefaults.standard
try defaults.set(object: UserInfo(userId: "id1"), forKey: "current-user")
let info = try defaults.get(objectType: UserInfo.self, forKey: "current-user")

要求

  • Swift 5 或更高版本

安装

CodableLocal 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中:

pod 'CodableLocal'

作者

bithavoc, [email protected]

许可

CodableLocal可在MIT许可下使用。更多信息请参阅LICENSE文件。