Answer the question
In order to leave comments, you need to log in
Apple apn error code 8, what is the mb problem?
I ask for help, I need to send push notifications for the application. I use https://github.com/immobiliare/ApnsPHP as a backend . According to this instruction I receive certificates.
I get the device token like this:
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
[RCTPushNotificationManager application:application didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
NSLog(@"Did register for remote notifications: %@", deviceToken);
}
but I remove comparison signs and spaces. As a result, I get error code 8 from the Google server, according to the docks apple invalid token. Can you tell me where I could go wrong?
Answer the question
In order to leave comments, you need to log in
Where are you removing spaces and comparison marks? The fact is that the token is not a string, but NSData, i.e. set of bytes. Accordingly, spaces and comparison signs are substituted only in the description method to make it easier for you to read. You don’t need to modify the received token anywhere, you received a valid token (a set of bytes) in the AppDelegate, pass it on and that’s it;)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question