CloudKitCodable icon indicating copy to clipboard operation
CloudKitCodable copied to clipboard

Custom keys

Open MaxHasADHD opened this issue 5 years ago • 1 comments

Is it possible to add support for custom keys? In CloudKit I have a property like "archived" but I'd want to define it as let isArchived: Bool

MaxHasADHD avatar Mar 16 '19 15:03 MaxHasADHD

Doesn't it work with the regular Codable mechanism of customizing keys?

struct MyThing: Codable {
    let isArchived: Bool

    enum CodingKeys: String, CodingKey {
        case isArchived = "archived"
    }
}

insidegui avatar Mar 16 '19 15:03 insidegui