0

I'm following this WWDC2020 video in trying to specify cloudKit database scope to public, like

cloudKitContainerOptions.databaseScope = .public

However Xcode 13 always complained that

com.apple.coredata.cloudkit.zone:__defaultOwner__ = <CKError 0x6000014988d0: "Server Rejected Request" (15/2027); server message = "Custom zones are not allowed in public DB"

even though I didn't create any custom zone in the public database or specify the zone from iOS application side. Pointing the above databaseSceope = .private works fine and the app does save the records to the private database in a zone called com.apple.coredata.cloudkit.zone.

CodeBrew
  • 6,457
  • 2
  • 43
  • 48

1 Answers1

0

I did more experiments, including an extremely simple database with only one configuration which is synced up to the public db. When the app runs for the first time it worked well, but once we shutdown the app and restart it, it would try to save the records to com.apple.coredata.cloudkit.zone, thus having the problem. Also searched around and found this developer forum discussion which describes exactly the same issue, and all these points to a bug introduced in iOS 15 related to CoreData + public CloudKit db integration.

CodeBrew
  • 6,457
  • 2
  • 43
  • 48