无法在 CKFetchRecordZoneChangesOperation 中使用 serverChangeToken

Can't use serverChangeToken in CKFetchRecordZoneChangesOperation

在 recordZoneFetchCompletionBlock 中,我正在获取 serverChangeToken,Apple 官方文档对 serverChangeToken 进行了说明 returns:

serverChangeToken The current server change token to be stored and used in subsequent CKFetchRecordZoneChangesOperation instances.

但是CKFetchRecordZoneChangesOperation中没有任何标记属性,其构造函数中没有这样的参数。如何将 serverChangeToken 传递到 CKFetchRecordZoneChangesOperation?

创建 ZoneConfiguration 的实例并将保存的令牌分配给 previousServerChangeToken

let options = CKFetchRecordZoneChangesOperation.ZoneConfiguration()
options.previousServerChangeToken = zoneChangeToken

并传递 configurationsByRecordZoneID 参数中的选项

zoneChangeToken代表当前要存储的服务器变更令牌