user1951992
user1951992

Reputation:

CloudKit: Is it possible to have a custom zone in a public database?

I might get involved in building a Cloud Kit enabled App if the subscription service is available in the public domain.

Having subscriptions for custom zones in a private database would surely only allow you to register for changes YOU have made somewhere else?

Upvotes: 6

Views: 2388

Answers (3)

Enrico Cupellini
Enrico Cupellini

Reputation: 445

As stated in apple docs you can create additional custom zones only in the private database,

but like Erik correctly said, you can share your private records contained in a custom zone into the shared database, as the video he linked shows from min 20:00 on.

Upvotes: 0

Erik
Erik

Reputation: 2409

This has changed as of iOS10. It is now possible to receive updates when data in another user's private database changes by creating a CKShare are sharing it with participants. There isn't a lot of documentation on it yet, but I expect tutorials will start popping up before long.

WWDC 2016 CloudKit

Upvotes: 0

Edwin Vermeer
Edwin Vermeer

Reputation: 13127

Answering the question from your question title: The documentation of CKRecordZone says:

A CKRecordZone object defines an area for organizing related records in a database. Zones are an important part of how you organize your data. The public and private databases have a single default zone, and in the private database you can create additional custom zones as needed. Use custom zones to arrange and encapsulate groups of related records in the private database. Custom zones support other capabilities too, such as the ability to write multiple records as a single atomic transaction

So you can not create a zone in a public database

You are right. A private database is always linked to only 1 apple ID. If you want to receive notifications for changes in the private database, then both the user/device making the change and the user/device that has to receive the notification must be loged in using the same Apple ID.

Upvotes: 6

Related Questions