Guest User

Untitled

a guest
Apr 25th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. - (NSString*)stringWithDeviceToken:(NSData*)deviceToken {
  2. const char* data = [deviceToken bytes];
  3. NSMutableString* token = [NSMutableString string];
  4.  
  5. for (int i = 0; i < [deviceToken length]; i++) {
  6. [token appendFormat:@"%02.2hhX", data[i]];
  7. }
  8.  
  9. return [[token copy] autorelease];
  10. }
Add Comment
Please, Sign In to add comment