Search code examples
iosicloud

CloudKit iOS how could I set World Write Permission


How could I set World Write Permission on the iCloud Dashboard cause now it's disabled, and really need it

enter image description here


Solution

  • Short answer: You can't.

    For a running CloudKit app, a container’s public database is always readable, even when the user is not signed in to their iCloud account on the device. Saving records to the public database and accessing the private database requires that the user be signed in. If your app does more than read data from the public database, check to see whether the user is signed in before saving records.

    Reference: Designing for CloudKit

    CloudKit requires a user to be logged-in to an iCloud account to write to the public database.

    If you need to provide such functionality for users who don't have an iCloud account, or don't want to sign-in, you may want to investigate a different cloud solution.

    If you just need to write to the public database from your own server, you can use CloudKit Web Services with a server-to-server key.