CloudKit fetchRecordChangesOperation gives a “AppDefaultZone does not support sync semantics”

核能气质少年 提交于 2019-12-05 01:48:40

I fixed the problem by switching to a custom zone. I create the zone when I initialize CloudKit and when I go to initialize the zoneID I use this:

CKRecordZoneID *zoneID = [[CKRecordZoneID alloc] initWithZoneName:@"Custom Zone Name" ownerName:userRecordName];

where userRecordName is the record name for the CKRecord I get for the user when I call this method in the Cloudkit initialization:

[CKContainer defaultContainer] fetchUserRecordIDWithCompletionHandler:^(CKRecordID *recordID, NSError *error) {
     if (recordID) {
         // Save the user record id
         [self saveUserRecordName:recordID.recordName];

          /...

      }
}];
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!