change method to get device token as string
This commit is contained in:
Родитель
5054841e35
Коммит
4b422ba321
|
@ -79,11 +79,14 @@ NSString* const _UserAgentTemplate = @"NOTIFICATIONHUBS/%@(api-origin=IosSdk; os
|
||||||
|
|
||||||
- (NSString *)convertDeviceToken:(NSData *)deviceTokenData
|
- (NSString *)convertDeviceToken:(NSData *)deviceTokenData
|
||||||
{
|
{
|
||||||
NSString* newDeviceToken = [[[[[deviceTokenData description]
|
const char *data = [deviceTokenData bytes];
|
||||||
stringByReplacingOccurrencesOfString:@"<"withString:@""]
|
NSMutableString *newDeviceToken = [NSMutableString string];
|
||||||
stringByReplacingOccurrencesOfString:@">" withString:@""]
|
|
||||||
stringByReplacingOccurrencesOfString: @" " withString: @""] uppercaseString];
|
for (NSUInteger i = 0; i < [deviceTokenData length]; i++) {
|
||||||
return newDeviceToken;
|
[newDeviceToken appendFormat:@"%02.2hhx", data[i]];
|
||||||
|
}
|
||||||
|
|
||||||
|
return [newDeviceToken copy];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) registerNativeWithDeviceToken:(NSData*)deviceTokenData tags:(NSSet*)tags completion:(void (^)(NSError* error))completion;
|
- (void) registerNativeWithDeviceToken:(NSData*)deviceTokenData tags:(NSSet*)tags completion:(void (^)(NSError* error))completion;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче