阅读背景:

检查/比较CloudKit中的NSError代码?

来源:互联网 

I guess it is basic, but still .. how can I check whether I get a ZoneBusy error?

我想这是基本的,但仍然..我如何检查是否出现ZoneBusy错误?

if error.code == CKErrorCode.ZoneBusy { // <- compiler says can't use '==', then what?

Reference:

https://developer.apple.com/library/prerelease/ios/documentation/CloudKit/Reference/CloudKit_constants/index.html#//apple_ref/c/tdef/CKErrorCode

1 个解决方案

#1


6  

It appears that you are missing .rawValue.

看来你缺少.rawValue。

So it should be:

所以它应该是:

CKErrorCode.ZoneBusy.rawValue


分享到: