ios - NSCoding to CKRecord -


i have custom class made (swift-y) struct nscodable. want convert ckrecord in order use cloudkit. though set 'key value'-pairs when encoding struct, in understanding struct converted nsdata , can't convert dictionary (or key-value object). feeling not way go.

is there way make conversion directly? or step in-between (for instance converting data [string: string]- dictionary)?

nscoding going from/to same class. instead, write toserverdictionary method on custom class, including properties want send cloudkit, , use result call setvaluesforkeys on ckrecord.

you'll find there properties need specific types, in case better make method toserverrecord , create ckrecord , return it. can have updatewithserverrecord set receive back.


Comments

Popular posts from this blog

php - trouble displaying mysqli database results in correct order -

depending on nth recurrence of job in control M -

sql server - Cannot query correctly (MSSQL - PHP - JSON) -