#1595 - Moving MGLEventTypeAppUserTurnstile event to end of MGLMapboxEvents init method to ensure it only gets called once

This commit is contained in:
Brad Leege
2015-05-20 14:32:16 -05:00
parent 44caf2c7a9
commit a29587726c
2 changed files with 5 additions and 3 deletions

View File

@@ -51,9 +51,8 @@
[[MGLAccountManager sharedManager] setAccessToken:accessToken];
// Update MGLMapboxEvents
// NOTE: This is (likely) the initial setup of MGLMapboxEvents (via implicit call to +[MGLMapboxEvents sharedManager])
// Turn the Mapbox Turnstile to Count App Users
[MGLMapboxEvents pushEvent:MGLEventTypeAppUserTurnstile withAttributes:nil];
// NOTE: This is (likely) the initial setup of MGLMapboxEvents
[MGLMapboxEvents sharedManager];
}
+ (NSString *) accessToken {

View File

@@ -278,6 +278,9 @@ const NSTimeInterval MGLFlushInterval = 60;
MGLMapboxEvents *strongSelf = weakSelf;
[strongSelf validate];
}];
// Turn the Mapbox Turnstile to Count App Users
[self pushEvent:MGLEventTypeAppUserTurnstile withAttributes:nil];
}
return self;
}