CloudKit: Permission Failure" (10/2007)

trying to save an asset to the publicDatabase of the selected container (default)
error message: “Permission Failure” (10/2007); server message = “Operation not permitted”
can’t seem to figure out the cause / fix

tried different read/write rules in the security roles (but I don’t think it has anything to do with this)

CKContainer.default().publicCloudDatabase.save(audioRecord) { [unowned self] record, error in
}

record is nil; audioRecord that is being (tried to) saved is of course not

:confused:

extra info: if I upload an asset via the dashboard, am able to fetch that

You may just need to sign in to iCloud with an AppleID on the device or simulator.

“When no iCloud account is available, your app may fetch records and perform queries on the public database, but it may not save changes. (Saving records to the public database requires an active iCloud account to identify the owner of those records.) Access to the private database always requires an active iCloud account on the device.”

1 Like

argh! makes sense - no wonder another project similar to this worked fine on my device - should have figured it out instead of being so focussed on the error message; thanks, Steve!

This topic was automatically closed after 166 days. New replies are no longer allowed.