diff --git a/platform/ios/MGLAccountManager.m b/platform/ios/MGLAccountManager.m index 1a9bbe47a..a49433777 100644 --- a/platform/ios/MGLAccountManager.m +++ b/platform/ios/MGLAccountManager.m @@ -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 { diff --git a/platform/ios/MGLMapboxEvents.m b/platform/ios/MGLMapboxEvents.m index 6b15df145..b6daaab3b 100644 --- a/platform/ios/MGLMapboxEvents.m +++ b/platform/ios/MGLMapboxEvents.m @@ -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; }