Skip to content

Add object detection, tracking, mobile notifications, and search to any security camera.

print full token

roryclear5bdf421ee664
diff --git a/clearcam/AppDelegate.m b/clearcam/AppDelegate.m
index 9a2c95b..f29c2ec 100644
--- a/clearcam/AppDelegate.m
+++ b/clearcam/AppDelegate.m
@@ -90,8 +90,14 @@
#pragma mark - Remote Notification Methods
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
- NSString *token = [[deviceToken description] stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"<>"]];
- token = [token stringByReplacingOccurrencesOfString:@" " withString:@""];
+ const unsigned char *dataBuffer = (const unsigned char *)[deviceToken bytes];
+ if (!dataBuffer) {
+ return;
+ }
+ NSMutableString *token = [NSMutableString stringWithCapacity:(deviceToken.length * 2)];
+ for (int i = 0; i < deviceToken.length; i++) {
+ [token appendFormat:@"%02x", dataBuffer[i]];
+ }
NSLog(@"Device Token: %@", token);
}