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

Enable Metrics by default default default - #1536

Closed
1ec5 wants to merge 1 commit into
masterfrom
1ec5-metrics-determinism
Closed

1ec5 wants to merge 1 commit into
masterfrom
1ec5-metrics-determinism

Conversation

@1ec5

@1ec5 1ec5 commented May 12, 2015

Copy link
Copy Markdown
Contributor

This PR enables Mapbox Metrics by default when Settings.bundle is absent but allows Settings.bundle to override the default. It avoids registering defaults for non-Mapbox preferences. The two-phase registration ensures that the defaults don’t default to unexpected values, yet gives the developer a chance to call +[MGLAccountManager mapboxMetricsEnabledSettingShownInApp] before the hard assertion.

This PR fixes #1518 and supersedes #1534. It also supersedes 4837359 from #1491, which failed to take into consideration the following scenarios:

  • The host app lacks a Settings.bundle.
  • The host app already has a Settings.bundle but it doesn’t contain a Mapbox Metrics switch.

/cc @bleege @incanus

Enable Mapbox Metrics by default when Settings.bundle is absent, but allow Settings.bundle to override the default. Don’t register defaults for non-Mapbox preferences. The two-phase registration ensures that the defaults don’t default to unexpected values, yet gives the developer a chance to call `+[MGLAccountManager mapboxMetricsEnabledSettingShownInApp]` before the hard assertion.

Fixes #1518.
@1ec5 1ec5 added bug iOS Mapbox Maps SDK for iOS refactor telemetry Integration with Mapbox Telemetry libraries labels May 12, 2015
@1ec5 1ec5 added this to the iOS Beta 1 milestone May 12, 2015
@1ec5 1ec5 self-assigned this May 12, 2015
@1ec5

1ec5 commented May 12, 2015

Copy link
Copy Markdown
Contributor Author

These changes have been pulled in #1491. We can reopen this PR if that one fails to make it into beta 1 for some reason.

@1ec5 1ec5 closed this May 12, 2015
@jfirebaugh
jfirebaugh deleted the 1ec5-metrics-determinism branch May 12, 2015 23:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MGLMapboxMetrics registers defaults for non-Mapbox settings

1 participant