Check / Compare NSError Code in CloudKit?

I assume this is basic, but still ... How can I check if there is a bug ZoneBusy

?

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

      

enter image description here

Link:

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

+3


source to share


1 answer


It seems that you are missing .rawValue

.

So it should be:



CKErrorCode.ZoneBusy.rawValue

+6


source







All Articles