OGeek|极客世界-中国程序员成长平台

标题: ios - CKRecordZone 中的记录仍显示在 CloudKit 仪表板中 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-11 17:11
标题: ios - CKRecordZone 中的记录仍显示在 CloudKit 仪表板中

我们有一个应用程序可以将记录同步到 CloudKit。

它们存储在自定义区域中。我们需要提供一个从 CloudKit 中“清除所有数据”的功能。由于记录的数量可能很高,我们不想单独或批量删除它们(可能是很多批处理)。所以我们直接删除自定义区域。

区域已成功删除,但记录仍显示在 CloudKit 仪表板中。这是预期的吗?



Best Answer-推荐答案


正如文档所说,您所做的应该是正确的:

Deleting a record zone also deletes any records it contains.

但是你在Cloud Dashboard中看到的应该是那些缓存的记录造成的,这些缓存在未来最终会被删除,只是不会立即发生。

doc中没有明确的解释,但确实在CKAsset上提到了类似的策略:

... When no asset objects refer to the data, the server lazily deletes the asset data at some point in the future. (Exactly when is not specified, but assume at least several days.)

关于ios - CKRecordZone 中的记录仍显示在 CloudKit 仪表板中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38788601/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4