检查/比较 CloudKit 中的 NSError 代码?
Check / Compare NSError Code in CloudKit?
我想这是基本的,但仍然..我如何检查我是否收到 ZoneBusy
错误?
if error.code == CKErrorCode.ZoneBusy { // <- compiler says can't use '==', then what?
参考:
您似乎缺少 .rawValue
。
所以应该是:
CKErrorCode.ZoneBusy.rawValue
我想这是基本的,但仍然..我如何检查我是否收到 ZoneBusy
错误?
if error.code == CKErrorCode.ZoneBusy { // <- compiler says can't use '==', then what?
参考:
您似乎缺少 .rawValue
。
所以应该是:
CKErrorCode.ZoneBusy.rawValue