iCloud CoreData integration Issue

Hi,

I have configured my ios app with iCloud Coredata sync.

I have already checked bundleId, containerId, and cloud login on the device.

I am getting the following error.

error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _performSetupRequest:]_block_invoke(1242): <NSCloudKitMirroringDelegate: 0x600003d085a0>: Failed to set up CloudKit integration for store: <NSSQLCore: 0x105814630> (URL: file:///Users/santoshsingh/Library/Developer/CoreSimulator/Devices/B49DDBBB-6111-4664-897C-08976854137E/data/Containers/Data/Application/55E67DB0-8CAE-416D-A873-161443FA690F/Library/Application%20Support/default.store) <CKError 0x600000c786f0: "Partial Failure" (2/1011); "Failed to modify some record zones"; uuid = EC168AB2-FDDD-47C6-B6E1-8C6A52C11F55; container ID = "iCloud.com.AmeristarFence.PerimeterInSite"; partial errors: { com.apple.coredata.cloudkit.zone:defaultOwner = <CKError 0x600000c71ec0: "Permission Failure" (10/2007); server message = "Invalid bundle ID for container"; op = FED32AB88A4F36CC; uuid = EC168AB2-FDDD-47C6-B6E1-8C6A52C11F55> }> CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _finishedRequest:withResult:]: Finished request: <NSCloudKitMirroringDelegateSetupRequest: 0x600002161c70> 26F773DB-4986-430A-A3FF-AC39B9390223 with result: <NSCloudKitMirroringResult: 0x600000c72130> storeIdentifier: CAC05ADB-DC9A-4CC5-9530-91FDDEEC7DD2 success: 0 madeChanges: 0 error: <CKError 0x600000c786f0: "Partial Failure" (2/1011); "Failed to modify some record zones"; uuid = EC168AB2-FDDD-47C6-B6E1-8C6A52C11F55; container ID = "iCloud.com.AmeristarFence.PerimeterInSite"; partial errors: { com.apple.coredata.cloudkit.zone:defaultOwner = <CKError 0x600000c71ec0: "Permission Failure" (10/2007); server message = "Invalid bundle ID for container"; op = FED32AB88A4F36CC; uuid = EC168AB2-FDDD-47C6-B6E1-8C6A52C11F55> }> CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate checkAndExecuteNextRequest]: <NSCloudKitMirroringDelegate: 0x600003d085a0>: Checking for pending requests. CoreData: CloudKit: CoreData+CloudKit: -[NSCloudKitMirroringDelegate checkAndExecuteNextRequest]_block_invoke(3569): <NSCloudKitMirroringDelegate: 0x600003d085a0>: No more requests to execute. error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate recoverFromError:]: <NSCloudKitMirroringDelegate: 0x600003d085a0> - Attempting recovery from error: <CKError 0x600000c786f0: "Partial Failure" (2/1011); "Failed to modify some record zones"; uuid = EC168AB2-FDDD-47C6-B6E1-8C6A52C11F55; container ID = "iCloud.com.AmeristarFence.PerimeterInSite"; partial errors: { com.apple.coredata.cloudkit.zone:defaultOwner = <CKError 0x600000c71ec0: "Permission Failure" (10/2007); server message = "Invalid bundle ID for container"; op = FED32AB88A4F36CC; uuid = EC168AB2-FDDD-47C6-B6E1-8C6A52C11F55> }> error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _recoverFromPartialError:forStore:inMonitor:]_block_invoke(2775): <NSCloudKitMirroringDelegate: 0x600003d085a0>: Found unknown error as part of a partial failure: <CKError 0x600000c71ec0: "Permission Failure" (10/2007); server message = "Invalid bundle ID for container"; op = FED32AB88A4F36CC; uuid = EC168AB2-FDDD-47C6-B6E1-8C6A52C11F55; container ID = "iCloud.com.AmeristarFence.PerimeterInSite"> error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _recoverFromPartialError:forStore:inMonitor:]: <NSCloudKitMirroringDelegate: 0x600003d085a0>: Error recovery failed because the following fatal errors were found: { "<CKRecordZoneID: 0x600000c720a0; zoneName=com.apple.coredata.cloudkit.zone, ownerName=defaultOwner>" = "<CKError 0x600000c71ec0: "Permission Failure" (10/2007); server message = "Invalid bundle ID for container"; op = FED32AB88A4F36CC; uuid = EC168AB2-FDDD-47C6-B6E1-8C6A52C11F55; container ID = "iCloud.com.AmeristarFence.PerimeterInSite">"; }

This following technote discusses how to handle the error you described:

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

iCloud CoreData integration Issue
 
 
Q