gpt4 book ai didi

ios - CloudKit CKError "Invalid Arguments"与 "Bad sync continuation data"

转载 作者:可可西里 更新时间:2023-11-01 04:37:18 24 4
gpt4 key购买 nike

我正在使用 iOS 10 开发 Xcode 8.3,我关注了 Apple 的 Cloud Kit Quick Start用于维护云数据本地缓存的文档,当私有(private)数据库区域中的数据发生更改时,我的设备能够接收推送通知,但在尝试获取区域更改时,我总是会收到以下错误:

2017-06-17 11:58:11.376807-0400 MyApp[10694:5029263] received remote notification
2017-06-17 11:58:11.897402-0400 MyApp[10694:5031532] fetch database change completed
2017-06-17 11:58:11.897606-0400 MyApp[10694:5031532] zone deletions
2017-06-17 11:58:12.320908-0400 MyApp[10694:5031561] record zone fetch completed
Error fetching zone changes for private database: <CKError 0x170256620: "Invalid Arguments" (12/2006); server message = "Bad sync continuation data"; uuid = xxxxxxxx-EFD7-459D-xxxx-xxxxxxxxxxx; container ID = "iCloud.com.mycompany.MyApp">
2017-06-17 11:58:12.332247-0400 MyApp[10694:5031561] fetch record zone changes completed
Error fetching zone changes for private database: <CKError 0x174640150: "Partial Failure" (2/1011); "Couldn't fetch some items when fetching changes"; uuid = xxxxxxxx-EFD7-459D-xxxx-xxxxxxxxxxx; container ID = "iCloud.com.mycompany.MyApp"; partial errors: {
PrivateZone:__defaultOwner__ = <CKError 0x170254670: "Invalid Arguments" (12/2006); server message = "Bad sync continuation data">
}>

“Bad sync continuation data”非常令人困惑,因为我无法在 Apple 文档中找到对此错误的解释,也无法在谷歌搜索中找到任何引用。以前有人遇到过这个吗?

最佳答案

在进一步思考“继续”在这种情况下的含义并深入研究 Apple 示例后,我意识到问题在于我只为在不同获取更改阶段返回的服务器更改 token 保留了一个变量,如下所示fetchDatabaseChangesfetchZoneChanges 方法。添加变量以跟踪数据库更改 token 和区域更改 token (每个区域都有自己的)后,“Bad sync continuation data”错误消失了,我可以看到从服务器返回的更改记录。

关于ios - CloudKit CKError "Invalid Arguments"与 "Bad sync continuation data",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44609607/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com