【问题标题】:cloudkit "Your request contains more than the maximum number of items in a single request (400)"cloudkit“您的请求包含超过单个请求中的最大项目数(400)”
【发布时间】:2014-10-12 11:29:45
【问题描述】:

使用

进行查询时
    [publicDatabase performQuery:query
                inZoneWithID:nil
           completionHandler:^(NSArray *results, NSError *error) {...

如果返回的结果计数为 100 或更高,我收到以下错误

70] Error: <CKError 0x170641a70: "Invalid Arguments" (12/1020); "Your request contains more than the maximum number of items in a single request (400)"> 

我在后端处于开发者模式。这是否意味着,我不能对超过 100-200 个返回的对象进行查询?不多……还有其他的ClouKits部署方式吗?

【问题讨论】:

    标签: ios cocoa cocoa-touch cloudkit


    【解决方案1】:

    在 API 中查找 CKQueryOperation。它会给你一个光标,你可以遍历所有结果,确保将你的 operation.resultsLimit 设置为可管理的东西,否则你会得到同样的错误。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-03
      • 1970-01-01
      相关资源
      最近更新 更多