Created
December 6, 2016 14:17
-
-
Save hammadzz/bcbc5e7c950dc9253a8e247bb5844868 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSString *)stringWithDeviceToken:(NSData *)deviceToken { | |
const char *data = [deviceToken bytes]; | |
NSMutableString *token = [NSMutableString string]; | |
for (NSUInteger i = 0; i < [deviceToken length]; i++) { | |
[token appendFormat:@"%02.2hhX", data[i]]; | |
} | |
return [token copy]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment