Skip to content

Instantly share code, notes, and snippets.

@nursarowar
Forked from phynet/deviceToken.m
Created May 27, 2017 13:51
Show Gist options
  • Save nursarowar/2ec0e6fa98a9abdb415c83e7f914e551 to your computer and use it in GitHub Desktop.
Save nursarowar/2ec0e6fa98a9abdb415c83e7f914e551 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