developer developer - 1 year ago 97
iOS Question

iOS FBAudienceNetwork Error codes consts

In android when I get error I get an class.
For that i can check which kind of error as occurred (like NETWORK_ERROR_CODE,NO_FILL_ERROR_CODE,...)

In iOS i am getting a general NSError object in case of error, for example:

- (void)adView:(FBAdView *)adView didFailWithError:(NSError *)error;

how can I check which kind of error occurred in iOS?


There are no error domains or constants in FBAudienceNetwork iOS SDK. is a local error code for FB SDK (android). It is not necessary that you can find those codes in iOS.

To see detail of error just log your error like so:

NSLog(@"Error %@",[error localizedDescription]);

Error Codes available in Facebook SDK can be found here and here (Facebook Ads).

I'll suggest you to find error domain first. iOS usage Domains and Codes for error identification. Reference

NSURLErrorDomain codes are here.