RNNotificationUtils.m 442 Bytes
Newer Older
1
#import "RNNotificationUtils.h"
2

3
@implementation RNNotificationUtils
4 5 6 7 8 9 10 11 12 13 14 15 16

+ (NSString *)deviceTokenToString:(NSData *)deviceToken {
    NSMutableString *result = [NSMutableString string];
    NSUInteger deviceTokenLength = deviceToken.length;
    const unsigned char *bytes = deviceToken.bytes;
    for (NSUInteger i = 0; i < deviceTokenLength; i++) {
        [result appendFormat:@"%02x", bytes[i]];
    }
    
    return [result copy];
}

@end