summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorBrad Leege <bleege@gmail.com>2015-03-24 11:33:08 -0500
committerBrad Leege <bleege@gmail.com>2015-03-24 11:33:08 -0500
commit308d382bd28b0a03eb5bf427f9ff83316fea3c85 (patch)
treef7c9dd8842a18f581dd5dc74221753e5d7c072a2 /platform
parent25381187be68f9a170082aa732bb3df61af34baf (diff)
downloadqtlocation-mapboxgl-308d382bd28b0a03eb5bf427f9ff83316fea3c85.tar.gz
#1033 - Building Mapbox Metrics Disabled UI in Settings.app and functionality in Events tracking infrastructure
Diffstat (limited to 'platform')
-rw-r--r--platform/ios/MGLMapboxEvents.m8
1 files changed, 6 insertions, 2 deletions
diff --git a/platform/ios/MGLMapboxEvents.m b/platform/ios/MGLMapboxEvents.m
index 11303bc0ec..a231b5115f 100644
--- a/platform/ios/MGLMapboxEvents.m
+++ b/platform/ios/MGLMapboxEvents.m
@@ -123,7 +123,12 @@ NSNumber *scale;
return;
}
- // TODO - Add Metrics Disabled App Wide Check
+ // Add Metrics Disabled App Wide Check
+ if ([[NSUserDefaults standardUserDefaults] objectForKey:@"mapbox_metrics_disabled"] != nil) {
+ NSLog(@"Mapbox Metrics have been disabled for this app.");
+ [_queue removeAllObjects];
+ return;
+ }
if (!event) {
return;
@@ -173,7 +178,6 @@ NSNumber *scale;
return;
}
-
int upper = (int)_flushAt;
if (_flushAt > [_queue count]) {
if ([_queue count] == 0) {