I'm getting the following error.
ERROR[CKErrorDomain:2] Failed to modify some records,
<CKError 0x1c005e1e0: "Partial Failure" (1011); "Failed to modify some records";
partial errors: {
BB27A0F8-0D8A-4279-A4E6-515B4E6C5116:(MainCustomZone:__defaultOwner__) =
<CKError 0x1c0050740: "Zone Not Found" (26/2036); server message = "Zone 'MainCustomZone'
does not exist"; uuid = E4AE311D-A73F-4F8A-BAF7-1EF5082D2FA9>
}>
My app works fine on my development devices, but in testflight for my beta users they get the error above. When I use a testflight build it still works fine for me, yes I am pointing at the production conatiner in my entitlements I have set the 'com.apple.developer.icloud-container-environment' set to 'production.
I've triple checked that the I'm looking at the correct container and the zone name is spelt correctly.
I have iCloud enabled in my developer account under app id's.
I've also got Write set for authentication, in security roles for each record type.
Please can someone suggest what the problem is?
I've been researching the issue without success.
Here's some typical code to create a zone which I use.
CKFetchRecordChangesOperation *changesOperation = [[CKFetchRecordChangesOperation alloc]
initWithRecordZoneID: [self customZone]
previousServerChangeToken: previousServerChangeToken];
-(CKRecordZoneID*)customZone
{
return [[CKRecordZoneID alloc] initWithZoneName: cCUSTOM_ZONE
ownerName: CKOwnerDefaultName];
}
There is only one zone in a database - the Default zone. If your app is using any other zones, your app must create the zone before attempting to access (or write) any records in the zone.
You probably created the zone in development at some point which is why the code works there.
The screenshot is showing your private database. Every user has their own private database and you can't see the private database of other users in the dashboard. You need to create the zone via code in your app.