CloudKit, core data: "Failed to sync user keys" after Xcode update to 13.4.1

After update to xcode 13.4.1 I get errors concerning CloudKit core data private sync.

When installing an app in an unused simulator I get the following errors, and the icloud data will not sync to or from the device.

CoreData: error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _performSetupRequest:]_block_invoke(1106): <NSCloudKitMirroringDelegate: 0x600000208f70>: Failed to set up CloudKit integration for store: <NSSQLCore: 0x15a506040>

<CKError 0x6000037a35d0: "Partial Failure" (2/1011); "Failed to modify some record zones"; partial errors: { com.apple.coredata.cloudkit.zone:defaultOwner = <CKError 0x600003784cc0: "Internal Error" (1/5000); "Failed to sync user keys">

Used simulators where the app has been running earlier and physical devices work, where the icloud private data sync as expected.

Same build worked perfect before update.

Checked correct container-name, and rebuilt the core data NSManagedObject subclasses.

Has anyone had these errors and solved them?

I couldn't get Core Data with CloudKit working in Simulator.

My current solution is... debug/develop with real device.

  • Use real device, and now you don't have to use your developer account (iCloud) on your real device, you could use your personal iCloud account.
  • On CloudKit Dashboard there is a new option called "Act as iCloud Account" which can be used into your personal account
  • Then you can debug and see your private database records for your personal account.
  • If you don't have more than 1 device you could a build a simple UI (swiftUI), use your Mac as your other device

I'm experiencing the exact same problem with xcode 13.4.1 / core data /cloudKit Is there a way to get things OK as before ?

Experiencing the same problem with the simulator. Have you filed a bug report?

CloudKit, core data: "Failed to sync user keys" after Xcode update to 13.4.1
 
 
Q