修改CKRecords时CloudKit错误:“区域忙”

时间:2015-05-13 19:58:27

标签: ios cloudkit

这是一段代码,我在其中修改用户私有CloudKit DB上的一些记录。

 modified all ... 284 w err 'nil' Optional([:])

这非常有效:

 modified all ... 0 w err '<CKError 0x7f9210e92840:"Zone Busy" (23/2029);
    "Zone busy">' Optional([NSDebugDescription: CKInternalErrorDomain: 2029,
    NSLocalizedDescription: Zone busy, NSUnderlyingError: <CKError 0x7f9210ea7dd0:
    "Unknown Error" (2029)>])

但是我时不时地得到以下输出:

Array
(
    [0] => stdClass Object
        (
            [users_info_id] => 1
            [user_id] => 374
            [user_email] => foos@foo.com
            [address_type] => BT
            [firstname] => Foo
            [lastname] => Faa
            [vat_number] => 
            [country_code] => US
            [address] => Jajajaja
            [city] => KOKOKOKOKOKO
            [state_code] => MD
            [zipcode] => 20745
            [phone] => 2401111111
        )
    [1] => stdClass Object
        (
            [users_info_id] => 1
            [user_id] => 374
            [user_email] => foos@foo.com
            [address_type] => ST
            [firstname] => Foos
            [lastname] => Faas
            [vat_number] => 
            [country_code] => US
            [address] => JSUSUSUS
            [city] => LASOSLSL
            [state_code] => DC
            [zipcode] => 1234
            [phone] => 1234567895
        )
        // ... about 500 records...
)

我认为这是CloudKit方面的某种打嗝 - 但我如何检测到这一点?我该怎么处理呢?

1 个答案:

答案 0 :(得分:6)

此错误表示您的请求没问题,但云服务器处理请求已超载。您应该等待一段时间后再次尝试操作。这也是在WWDC 2014视频231 - Advanced CloudKit结束时提到的。

可以在此处找到一些其他信息:CloudKit Framework Constants Reference