Posts

Post not yet marked as solved
8 Replies
13k Views
I am trying to load a list from cloud kit and getting a "Field 'recordName' is not marked queryable". The record type list is queryable. The field recordName is a system generated field that I cannot modify in the cloudkit dashboard. What can I do to load these items?let predicate: NSPredicate = NSPredicate(value: true) let query: CKQuery = CKQuery(recordType: "List", predicate: predicate) tView.text = "Fetching Icloud data" db.perform(query, inZoneWith: nil) { (records: [CKRecord]?, error: Error?) in if error != nil || records == nil{ print("Error in load: \(error!)") return } else{ var aList:[String] = [] for i in 0..<records!.count{ let record:CKRecord = records![i] aList.append(record.object(forKey: "item") as! String) } print("Records: \(records!)") OperationQueue.main.addOperation { self.tView.text = aList.joined(separator: "\n") } } }
Posted
by Ruppert20.
Last updated
.