diff options
author | Brad Leege <bleege@gmail.com> | 2015-05-12 10:50:46 -0500 |
---|---|---|
committer | Brad Leege <bleege@gmail.com> | 2015-05-12 10:50:46 -0500 |
commit | 87551c6d0e189cd6d98cc75e93ba4f0f176a3464 (patch) | |
tree | e4763927fa8fa1613ed0b931756a5817538acad7 /platform | |
parent | 48e21ae6e915aecf24022e7ba568d436d876160b (diff) | |
download | qtlocation-mapboxgl-87551c6d0e189cd6d98cc75e93ba4f0f176a3464.tar.gz |
#1516 - Renaming setShowsOptOutInApp to setMapboxMetricsEnabledSettingShownInApp for app consistency. Implementing wordsmith edits to NSAssert text. Removing technical debt.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/ios/MGLAccountManager.m | 6 | ||||
-rw-r--r-- | platform/ios/MGLMapboxEvents.m | 8 |
2 files changed, 5 insertions, 9 deletions
diff --git a/platform/ios/MGLAccountManager.m b/platform/ios/MGLAccountManager.m index f93f379f44..09bfb3db23 100644 --- a/platform/ios/MGLAccountManager.m +++ b/platform/ios/MGLAccountManager.m @@ -39,11 +39,11 @@ static MGLAccountManager *_sharedManager; return _sharedManager; } -+ (void) setShowsOptOutInApp:(BOOL)showsOptOut { - [[MGLAccountManager sharedInstance] setShowsOptOutInApp:showsOptOut]; ++ (void) setMapboxMetricsEnabledSettingShownInApp:(BOOL)showsOptOut { + [MGLAccountManager sharedInstance].showsOptOutInApp = showsOptOut; } -+ (BOOL) showsOptOutInApp { ++ (BOOL) mapboxMetricsEnabledSettingShownInApp { return [MGLAccountManager sharedInstance].showsOptOutInApp; } diff --git a/platform/ios/MGLMapboxEvents.m b/platform/ios/MGLMapboxEvents.m index 0246d429ef..244928f95c 100644 --- a/platform/ios/MGLMapboxEvents.m +++ b/platform/ios/MGLMapboxEvents.m @@ -118,12 +118,12 @@ NSString *const MGLEventGestureRotateStart = @"Rotation"; self = [super init]; if (self) { - if (! [MGLAccountManager sharedInstance].showsOptOutInApp) { + if (! [MGLAccountManager mapboxMetricsEnabledSettingShownInApp]) { // Opt Out is not configured in UI, so check for Settings.bundle // Put Settings bundle into memory NSString *appSettingsBundle = [[NSBundle mainBundle] pathForResource:@"Settings" ofType:@"bundle"]; - NSAssert(appSettingsBundle, @"End Users must be able to opt out of Metrics in your app either via the Settings.bundle or in the app itself which must be noted via setting [MGLAccountManager setShowsOptOutInApp:YES]"); + NSAssert(appSettingsBundle, @"End users must be able to opt out of Metrics in your app, either via the Settings.bundle or in the app itself which must be noted via setting +[MGLAccountManager setShowsOptOutInApp:YES]"); // Dynamic Settings.bundle loading based on: // http://stackoverflow.com/questions/510216/can-you-make-the-settings-in-settings-bundle-default-even-if-you-dont-open-the @@ -246,10 +246,6 @@ NSString *const MGLEventGestureRotateStart = @"Rotation"; [self pauseMetricsCollection]; } -+ (void) setShowsOptOutInApp:(BOOL)showsOptOut { - -} - // Must be called from the main thread. // + (void) setToken:(NSString *)token { |