I have a record on my CloudKit public database that was made via the NSPersistentCloudKitContainer. In Core Data, the attribute is of type [String] and when I add it to the public database, it is converted to Bytes.
When I fetch this record and try to extract the [String] like so
strings = record["CD_strings"] as! [String]
I get the following error:
Could not cast value of type '_NSInlineData' (0x7fe5ae87c2a8) to 'NSArray' (0x7fe5ad835f90).
How are you supposed to get the CKRecordValue as type [String]?
All you need to do is to have the attribute type as
transformable, addNSSecureUnarchiveFromDatain the transformer field and[String]in Custom Class: