Good morning NSPersistent​Cloud​Kit​Container share URL stays nil and mirroring repeatedly resets after CKError​.zone​Not​Found on stale Core Data share zone

I am debugging a CloudKit sharing issue in an iOS app that uses NSPersistent​Cloud​Kit​Container with Core Data backed sharing. The symptom is that collaboration/share creation appears to succeed locally, but the resulting CKShare never gets a server-backed URL. UICloud​Sharing​Controller therefore cannot proceed because share​.url remains nil. (I do see the UICloudSharingcontroller Dialog and am abble to select people to share, one executed the share icon in the message window just spins

After adding extensive logging, it looks like the real problem is not the sharing UI itself, but that Core Data + CloudKit mirroring is already in a bad state before share presentation begins.

What I am seeing:

  1. Repeated CloudKit import failures with CKError​.partial​Failure
  2. The partial failure always contains one stale share zone with: • CKError​.zone​Not​Found • server message: "​Zone does not exist"
  3. Core Data then repeatedly logs: • NSCloud​Kit​Mirroring​Delegate​Will​Reset​Sync​Notification​Name • reason: Zone​Deleted • followed by a full mirroring reset
  4. Only after that reset loop do I attempt to prepare the collaboration share
  5. fetch​Share(object:) returns a share record named cloudkit​.zoneshare
  6. participants is 1
  7. but share​.url remains nil forever, even after polling for ~20 attempts / ~20+ seconds

Representative log sequence:

CoreData+CloudKit ... Fetch finished with error: <CKError ... "Partial Failure"... partial errors: { com.apple.coredata.cloudkit.share.33781809-778A-461C-ABAB-872746C8F80D:defaultOwner = <CKError ... "Zone Not Found" (26/2036); server message = "Zone does not exist"> }>

NSCloudKitMirroringDelegateWillResetSyncNotificationName reason: 'ZoneDeleted' NSCloudKitMirroringDelegateDidResetSyncNotificationName reason: 'ZoneDeleted'

Preparing collaboration share for cruise 'Share 658' Fetching existing collaboration share for cruise 'Share 658' Fetch existing collaboration share result: found record='cloudkit.zoneshare' url='nil' participants='1'

You cannot get the URL of a share until it's been saved to the server Collaboration share URL polling attempt 1/20 ... ... Collaboration share URL polling attempt 20/20 ... Collaboration share 'cloudkit.zoneshare' never produced a URL

Important detail: This stale-zone Zone ​Not ​Found / Zone​Deleted reset cycle happens before the collaboration flow starts, so it looks like sharing is running inside an already unhealthy mirroring state rather than causing the corruption itself.

Questions:

  1. Is this a known failure mode where a deleted/stale Core Data CloudKit share zone can keep the mirroring delegate in a reset loop and prevent newly fetched/created CKShare objects from ever receiving a server URL?

  2. Is there an Apple-recommended way to recover from this in development besides deleting the app / resetting local data / clearing CloudKit development data?

  3. Is there any supported way to identify and purge stale share metadata or orphaned Core Data share zones without fully resetting the local store?

  4. If fetch​Share returns a CKShare whose record exists locally as cloudkit​.zoneshare but url stays nil, does that generally mean the share was never fully saved to the server, or can mirroring-reset churn itself prevent the URL from materializing?

Environment: • iOS app • Core Data + NSPersistent​Cloud​Kit​Container • CloudKit sharing enabled • issue observed in development environment

At this point my working theory is: • stale/deleted share zone in CloudKit development environment • NSPersistent​Cloud​Kit​Container import repeatedly hits zone​Not​Found • mirroring resets continuously • collaboration share can be fetched locally but never becomes server-backed enough to produce share​.url

If anyone from Apple or anyone who has hit this exact Zone​Deleted reset loop has guidance on the correct recovery path, I’d appreciate it.

Please reproduce this issue and attach a sysdiagnose from all of the involved devices so we can see the state of the objects in our logs. For more information about gathering a sysdiagnose please refer to this technote.

thank you I am working on getting the sysdiagnose now thanks again

Good morning NSPersistent​Cloud​Kit​Container share URL stays nil and mirroring repeatedly resets after CKError​.zone​Not​Found on stale Core Data share zone
 
 
Q