Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Add action sheet shortcut to Settings.app metrics opt-out - #1529

Closed
friedbunny wants to merge 2 commits into
mapbox:masterfrom
friedbunny:1519-actionsheet-metrics
Closed

friedbunny wants to merge 2 commits into
mapbox:masterfrom
friedbunny:1519-actionsheet-metrics

Conversation

@friedbunny

Copy link
Copy Markdown
Contributor

Dynamically checks if Settings.bundle has MGLMapboxMetricsEnabled key and only adds button to the ℹ️ action sheet if that key exists.

Only applicable to iOS 8+, tested to be safe with iOS 7.

Fixes #1519.

/cc @1ec5

Only applicable to iOS 8+. Dynamically checks if Settings.bundle has MGLMapboxMetricsEnabled key. Fixes #1519.
Comment thread platform/ios/MGLMapView.mm Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The property itself should be called hasSettingsBundleMetricsOptOut, without a renamed getter, because it doesn’t hold the opt-out control but only indicates its existence.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

@1ec5 1ec5 added iOS Mapbox Maps SDK for iOS telemetry Integration with Mapbox Telemetry libraries labels May 12, 2015
@friedbunny

Copy link
Copy Markdown
Contributor Author

ios simulator screen shot may 12 2015 10 50 54 am

@1ec5 1ec5 added the ready label May 17, 2015
@1ec5 1ec5 added this to the iOS Beta 2 milestone May 20, 2015
@1ec5 1ec5 self-assigned this May 20, 2015
@1ec5

1ec5 commented May 21, 2015

Copy link
Copy Markdown
Contributor

Hi @friedbunny, thanks for your patience on this PR. I’ve been busy reworking how Metrics-related preferences are read, particularly in #1553. At this point, I think it may make more sense to just show and hide the menu item based on +[MGLAccountManager mapboxMetricsEnabledSettingShownInApp]. (Right at startup, -[MGLMapboxEvents init] trawls the Settings bundle plist, just as you’re doing in -[MGLMapView hasSettingsBundleMetricsOptOut], and asserts when the developer hasn’t bothered to implement the switch either in Settings or in the host app.) That’ll simplify this change considerably. Other than that, this change looks great.

@friedbunny

Copy link
Copy Markdown
Contributor Author

@1ec5 That sounds good, I'll make that change and push to this branch.

You've really been shaking up the metrics prefs lately, I'm going to have to reread the code to see where things have settled. 💨

@friedbunny

Copy link
Copy Markdown
Contributor Author

Squashed at #1611. YOLO.

@friedbunny friedbunny closed this May 21, 2015
@mourner mourner removed the ready label May 21, 2015
@friedbunny
friedbunny deleted the 1519-actionsheet-metrics branch May 21, 2015 07:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

iOS Mapbox Maps SDK for iOS telemetry Integration with Mapbox Telemetry libraries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add shortcut to Mapbox Metrics opt-out to ℹ️

3 participants