[LQSession setAPIKey:@"d0ce2db5956fdadd0f757bd11221fdf6"];
if([LQSession savedSession]) {
[LQTracker sharedTracker];
[LQSession registerForPushNotificationsWithCallback:NULL];
NSLog(@"Saved GEOLOQI User ID %@",[[LQSession savedSession] userID]);
} else {
[LQSession createAnonymousUserAccountWithUserInfo:nil completion:^(LQSession *session, NSError *error) {
if(error) {
NSLog(@"ERROR: Failed to create account: %@", error);
} else {
[LQSession setSavedSession:session];
NSLog(@"User ID %@",[session userID]);
[LQSession registerForPushNotificationsWithCallback:^(NSData *deviceToken, NSError *error) {
if(error){
NSLog(@"Failed to register for push tokens: %@", error);
} else {
NSLog(@"Got a push token! %@", deviceToken);
NSLog(@"GEOLOQI User ID %@",[session userID]);
}
}];
// Start tracking
[[LQTracker sharedTracker] setProfile:LQTrackerProfileAdaptive];
}
}];
}
// Tell the SDK the app finished launching so it can properly handle push notifications, etc
[LQSession application:application didFinishLaunchingWithOptions:launchOptions];
It looks like you're new here. If you want to get involved, click one of these buttons!