Skip to content

Instantly share code, notes, and snippets.

@seanooi
Created April 26, 2016 19:13
Show Gist options
  • Save seanooi/5b6c6af79009effc376a4acb717cc754 to your computer and use it in GitHub Desktop.
Save seanooi/5b6c6af79009effc376a4acb717cc754 to your computer and use it in GitHub Desktop.
Parsing remote notification device token
const char *data = [deviceToken bytes];
NSMutableString *deviceTokenString = [NSMutableString string];
for (NSUInteger i = 0; i < [deviceToken length]; i++) {
[deviceTokenString appendFormat:@"%02.2hhx", data[i]];
}
NSLog(@"Push Notification Token %@", deviceTokenString);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment