Skip to content

Instantly share code, notes, and snippets.

@phynet
Last active May 27, 2017 13:51
Show Gist options
  • Select an option

  • Save phynet/3b1414b6e289ec9bea8f to your computer and use it in GitHub Desktop.

Select an option

Save phynet/3b1414b6e289ec9bea8f to your computer and use it in GitHub Desktop.
Get iOS device token for push notification
NSString *token = [[deviceToken description] stringByTrimmingCharactersInSet: [NSCharacterSet characterSetWithCharactersInString:@"<>"]];
token = [token stringByReplacingOccurrencesOfString:@" " withString:@""];
NSLog(@"Device Token %@: ", token);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment