Created
December 10, 2009 01:46
-
-
Save atnan/253035 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 (int i = 0; i < [deviceToken length]; i++) { | |
[token appendFormat:@"%02.2hhX", data[i]]; | |
} | |
return [[token copy] autorelease]; | |
} |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment