diff options
author | Brad Leege <bleege@gmail.com> | 2015-05-20 12:31:20 -0500 |
---|---|---|
committer | Brad Leege <bleege@gmail.com> | 2015-05-20 12:31:20 -0500 |
commit | a5bd2fa3c66991ff31ba5d4091eb8400f6fc4397 (patch) | |
tree | 4f1da8802d4e5b3c08d4766fafab4b0a90fc509d /platform | |
parent | 58b967605aa882f93d0db220cae29a49444cc842 (diff) | |
download | qtlocation-mapboxgl-a5bd2fa3c66991ff31ba5d4091eb8400f6fc4397.tar.gz |
#1595 - Adding exception so that Turnstile event will always be sent in
Diffstat (limited to 'platform')
-rw-r--r-- | platform/ios/MGLMapboxEvents.m | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/platform/ios/MGLMapboxEvents.m b/platform/ios/MGLMapboxEvents.m index 002e38d9d9..364a051809 100644 --- a/platform/ios/MGLMapboxEvents.m +++ b/platform/ios/MGLMapboxEvents.m @@ -432,9 +432,25 @@ const NSTimeInterval MGLFlushInterval = 60; __weak MGLMapboxEvents *weakSelf = self; dispatch_async(_serialQueue, ^{ + + if ([MGLEventTypeAppUserTurnstile isEqualToString:event]) { + // Build only IDFV event + NSString *vid = [[[UIDevice currentDevice] identifierForVendor] UUIDString]; + NSDictionary *vevt = @{@"vendorId": vid}; + + // Add to Queue + [_eventQueue addObject:vevt]; + + // Flush + [MGLMapboxEvents flush]; + + return; + } + MGLMapboxEvents *strongSelf = weakSelf; + if ( ! strongSelf) return; - + // Metrics Collection Has Been Paused if (_paused) { return; |