cloudkit “Your request contains more than the maximum number of items in a single request (400)”

佐手、 提交于 2019-12-12 19:28:16

问题


When doing a query with

    [publicDatabase performQuery:query
                inZoneWithID:nil
           completionHandler:^(NSArray *results, NSError *error) {...

I get the following error, if the returned results count is 100 or higher

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

I am in developer mode with the backend. Does this mean, I can't do a query with more than 100-200 returned objects? That not much... Is it any other ClouKits deployment mode?


回答1:


Look for CKQueryOperation in the API. it will give you a cursor that you can iterate through all the results, be sure to set your operaation.resultsLimit to something manageable or you will get the same error.



来源:https://stackoverflow.com/questions/26324643/cloudkit-your-request-contains-more-than-the-maximum-number-of-items-in-a-singl

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