[ad_1]
I created an app in CloudKit final 12 months and works advantageous.
Now I am creating a brand new app however I’ve a really silly drawback (possibly is the covid in my thoughts), in permission I can not flag the “Create” permission, so after I create a file the console prints:
Optionally available("Error saving file <CKRecordID: 0x100dc1540; recordName=idnumber0000001, zoneID=_defaultZone:__defaultOwner__> to server: CREATE operation not permitted")
I do not know if was altering one thing, in my previous app in safety position, the field “create” is flagged.
In new app, inside safety position in CloudKit dashboard:
if I create new Safety Position, its doable to examine Create:
However how can I assign this position to all customers?
the straightforward save file code:
let file = CKRecord(recordType: "VIP",
recordID: CKRecord.ID(recordName: "idnumber0000001"))
file["firstName"] = "Simone"
let publicDatabase = CKContainer.default().publicCloudDatabase
publicDatabase.save(file) { (file, error) in
if (error != nil) {
print("(String(describing: error?.localizedDescription))")
}
else {
print("file saved")
}
}
[ad_2]


