IOS notification error code

I used

- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error 

to handle the exception occurs during registration by clicking.

I would like to display customized messages for different errors.

So far, I have found that people use error.code to determine the type of error.

For instance:

  error.code = 3010 // is for the iPhone Simulator error.code = 3000 // Failed to get token 

I am wondering where Apple is documenting this error code because I would like to cover all types of errors

Thank you in advance

+4
source share
1 answer

It may be easier for you to query the NSError object for a localized explanation of the error and display it instead. This may save you some work, down to you.

0
source

All Articles