【发布时间】:2018-07-09 21:18:08
【问题描述】:
我收到以下错误。
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>
}>
我的应用在我的开发设备上运行良好,但在我的 beta 用户的 testflight 中,他们得到了上述错误。当我使用 testflight 构建时,它对我来说仍然可以正常工作,是的,我在我的权利中指向生产容器,我已将 'com.apple.developer.icloud-container-environment' 设置为 'production.
我已经三重检查了我正在查看的容器是否正确,并且区域名称的拼写是否正确。
我在我的开发者帐户中的应用 ID 下启用了 iCloud。
我还为每个记录类型设置了安全角色以进行身份验证。
这里有一些典型的代码来创建我使用的区域。
CKFetchRecordChangesOperation *changesOperation = [[CKFetchRecordChangesOperation alloc]
initWithRecordZoneID: [self customZone]
previousServerChangeToken: previousServerChangeToken];
-(CKRecordZoneID*)customZone
{
return [[CKRecordZoneID alloc] initWithZoneName: cCUSTOM_ZONE
ownerName: CKOwnerDefaultName];
}
【问题讨论】:
-
"这里有一些典型的代码来创建我使用的区域。"无论您处于开发阶段还是生产阶段,您都很少在代码中创建新区域。通常,您访问的是现有的。
标签: ios objective-c icloud cloudkit