#1595 - Moving MGLEventTypeAppUserTurnstile event to end of MGLMapboxEvents init method to ensure it only gets called once
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user