János
János

Reputation: 35042

Check / Compare NSError Code in CloudKit?

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

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

enter image description here

Reference:

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

Upvotes: 3

Views: 582

Answers (1)

Unheilig
Unheilig

Reputation: 16292

It appears that you are missing .rawValue.

So it should be:

CKErrorCode.ZoneBusy.rawValue

Upvotes: 6

Related Questions