iOS – DidRegisterforremotenotificationswithdevicetoken: NULL token

I am receiving the callback didRegisterForRemoteNotificationsWithDeviceToken:, but the data returned to me is empty…. So I don’t know the device token.

Is there any Has anyone seen this or have any suggestions?

Thank you

The answer is, I can’t just use UTF8 encoding to make NSData The card reads into the NSString and expects it to display the token.

This does not work:

- (void)application:(UIApplication *) application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)_deviceToken

NSLog(@"=== Device token: %@", [[[NSString alloc] initWithData:_deviceToken encoding:NSUTF8StringEncoding] autorelease]);

Do this:

NSLog(@"data %@", _deviceToken);

I am I received the callback didRegisterForRemoteNotificationsWithDeviceToken:, but the data returned to me is empty…. So I don’t know the device token.

Has anyone seen this before or have any suggestions?

Thank you

The answer is that I can’t just use UTF8 encoding to read the NSData token into NSString and expect it to display the token. < p>

This does not work:

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)_deviceToken

NSLog(@"=== Device token: %@", [[[NSString alloc] initWithData:_deviceToken encoding:NSUTF8StringEncoding] autorelease]);

Do this:

< p>

NSLog(@"data %@", _deviceToken);

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 3872 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.