#1033 - Building Mapbox Metrics Disabled UI in Settings.app and functionality in Events tracking infrastructure
This commit is contained in:
@@ -1,31 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreferenceSpecifiers</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Title</key>
|
||||
<string>Privacy Settings</string>
|
||||
<key>Type</key>
|
||||
<string>PSGroupSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
<key>Key</key>
|
||||
<string>mapbox_metrics_enabled_preference</string>
|
||||
<key>Title</key>
|
||||
<string>Mapbox Metrics</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
<key>TrueValue</key>
|
||||
<true/>
|
||||
<key>FalseValue</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</array>
|
||||
<key>StringsTable</key>
|
||||
<string>Root</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>PreferenceSpecifiers</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>Title</key>
|
||||
<string>Privacy Settings</string>
|
||||
<key>Type</key>
|
||||
<string>PSGroupSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
<key>Key</key>
|
||||
<string>mapbox_metrics_disabled</string>
|
||||
<key>Title</key>
|
||||
<string>Mapbox Metrics Are Disabled</string>
|
||||
<key>Type</key>
|
||||
<string>PSTitleValueSpecifier</string>
|
||||
<key>TrueValue</key>
|
||||
<true/>
|
||||
<key>FalseValue</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<!--
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<true/>
|
||||
<key>Key</key>
|
||||
<string>mapbox_metrics_enabled_preference</string>
|
||||
<key>Title</key>
|
||||
<string>Mapbox Metrics</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
<key>TrueValue</key>
|
||||
<true/>
|
||||
<key>FalseValue</key>
|
||||
<false/>
|
||||
</dict>
|
||||
-->
|
||||
</array>
|
||||
<key>StringsTable</key>
|
||||
<string>Root</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user