diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2015-05-08 12:06:51 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2015-05-08 12:06:51 -0700 |
commit | 13a88c5decbc3680989a4fc82733957c19efd9f2 (patch) | |
tree | 5973d748c77901438d5333f8350bdabbe737da59 | |
parent | c2afa54dd7c94d31c0eb4bcfa57128791975573e (diff) | |
parent | bb788f56f268cfebba2105be7e23744779cad7b8 (diff) | |
download | qtlocation-mapboxgl-13a88c5decbc3680989a4fc82733957c19efd9f2.tar.gz |
Merge pull request #1480 from mapbox/1ec5-metrics-keys
Rename settings keys
-rw-r--r-- | ios/app/Settings.bundle/Root.plist | 4 | ||||
-rw-r--r-- | platform/darwin/http_request_nsurl.mm | 2 | ||||
-rw-r--r-- | platform/ios/MGLMapboxEvents.m | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/ios/app/Settings.bundle/Root.plist b/ios/app/Settings.bundle/Root.plist index f3a995024e..076f402e1e 100644 --- a/ios/app/Settings.bundle/Root.plist +++ b/ios/app/Settings.bundle/Root.plist @@ -4,7 +4,7 @@ <dict> <key>PreferenceSpecifiers</key> <array> - <dict> + <dict> <key>Title</key> <string>Privacy Settings</string> <key>Type</key> @@ -16,7 +16,7 @@ <key>DefaultValue</key> <true/> <key>Key</key> - <string>mapbox_metrics_enabled_preference</string> + <string>MGLMapboxMetricsEnabled</string> <key>Title</key> <string>Mapbox Metrics</string> <key>Type</key> diff --git a/platform/darwin/http_request_nsurl.mm b/platform/darwin/http_request_nsurl.mm index 0006dbef80..5ab4e1b43e 100644 --- a/platform/darwin/http_request_nsurl.mm +++ b/platform/darwin/http_request_nsurl.mm @@ -154,7 +154,7 @@ void HTTPRequest::start() { @autoreleasepool { NSMutableString *url = [NSMutableString stringWithString:@(resource.url.c_str())]; - if ([[NSUserDefaults standardUserDefaults] objectForKey:@"mapbox_metrics_disabled"] == nil) { + if ([[NSUserDefaults standardUserDefaults] integerForKey:@"MGLMapboxAccountType"] == 0) { if ([url rangeOfString:@"?"].location == NSNotFound) { [url appendString:@"?"]; } else { diff --git a/platform/ios/MGLMapboxEvents.m b/platform/ios/MGLMapboxEvents.m index 93891217ca..fe19291ab0 100644 --- a/platform/ios/MGLMapboxEvents.m +++ b/platform/ios/MGLMapboxEvents.m @@ -221,7 +221,7 @@ NSString *const MGLEventGestureRotateStart = @"Rotation"; static MGLMapboxEvents *_sharedManager; dispatch_once(&onceToken, ^{ if ( ! NSProcessInfo.processInfo.mgl_isInterfaceBuilderDesignablesAgent && - [[NSUserDefaults standardUserDefaults] objectForKey:@"mapbox_metrics_disabled"] == nil) { + [[NSUserDefaults standardUserDefaults] integerForKey:@"MGLMapboxAccountType"] == 0) { void (^setupBlock)() = ^{ _sharedManager = [[self alloc] init]; }; @@ -326,8 +326,8 @@ NSString *const MGLEventGestureRotateStart = @"Rotation"; MGLMapboxEvents *strongSelf = weakSelf; if ( ! strongSelf) return; - // Opt Out Checking When Built - if (![[NSUserDefaults standardUserDefaults] boolForKey:@"mapbox_metrics_enabled_preference"]) { + // User has opted out + if (![[NSUserDefaults standardUserDefaults] boolForKey:@"MGLMapboxMetricsEnabled"]) { [_eventQueue removeAllObjects]; return; } |