This has bothered me for a little while. Is there a reason why I need to do this to set an object on a CKRecord.
task.record?.setObject(task.reference, forKey:ReferenceField)
instead of this
task.record?[ReferenceField] = task.reference
From what I read in the docs CKRecord should be subscript friendly