CloudKit how do I check for access level (public read, public write, private)

Hi,

I think the access status "available" means a private CloudKit db is accessible. While the reading of the public DB is always possible. But what about writing to the public DB. For this all I need is that the user is logged into iCloud, right? But how would I verify that?

All the best Christoph

Answered by deeje in 742172022

to determine if a user is signed into iCloud, use CKContainer.accountStatus { … } https://developer.apple.com/documentation/cloudkit/ckcontainer/1399180-accountstatuswithcompletionhandl

Going further, record types in CloudKit can have various read and write permissions using security roles. CloudKit Security Roles are not well documented. See this thread for more https://stackoverflow.com/questions/31369181/how-do-the-cloudkit-security-roles-and-permissions-work

Accepted Answer

to determine if a user is signed into iCloud, use CKContainer.accountStatus { … } https://developer.apple.com/documentation/cloudkit/ckcontainer/1399180-accountstatuswithcompletionhandl

Going further, record types in CloudKit can have various read and write permissions using security roles. CloudKit Security Roles are not well documented. See this thread for more https://stackoverflow.com/questions/31369181/how-do-the-cloudkit-security-roles-and-permissions-work

CloudKit how do I check for access level (public read, public write, private)
 
 
Q