In working with CloudKit, all types need to be Objective-C foundation classes. Since most types used in CloudKit are bridged from Swift to Obj-C there isn't any issue (i.e.
record[key] = 1 as NSNumber
record[key] = ([myString] as [NSString]) as NSArray
Just bridging will work, together with
let a = ["a", "bc", "def"] let nsa = NSArray(array: a) nsa is NSString // *** true ***