I'm trying to just save a record in a private user database, but when I run privateDB.saveRecord (), I get an error
Not Authenticated" (9/1002); "CloudKit access was denied by user settings"; Retry after 3.0 seconds>.
This account can log into the cloud control panel so that it is the application developer. What other problems can cause this? Any help would really be appreciated; I have been stuck on it for so long.
Here is my code:
//variable instantiation container = CKContainer.defaultContainer() println(container.containerIdentifier) publicDB = container.publicCloudDatabase privateDB = container.privateCloudDatabase //save record code let passRecord = CKRecord(recordType: "Password") passRecord.setValue("testytestPow", forKey: "title") passRecord.setValue("password02", forKey: "value") privateDB.saveRecord(passRecord, completionHandler: { (record, error) -> Void in if (error != nil) { println(error) } else { NSLog("Saved in cloudkit") self.fetchTodos() } })
source share