Repository navigation
Make telemetry on/off setting available in-app - #3445
Conversation
|
I'll squash this down before merging, but I wanted to preserve some code for discussion.
|
That would make the method unavailable, not deprecated. There’s an attribute for marking a method as unavailable, too, but I don’t think we need the backwards-incompatibility in this case. Just turn the method into a no-op with an
What if the ℹ️ button is hidden? Presumably the developer will implement the attribution elsewhere in the application, but then we should clarify the |
There was a problem hiding this comment.
Jazzy doesn’t recognize the deprecated attribute yet. Our convention from the appledoc days is to omit documentation for deprecated and unavailable methods, but if this information is still valuable, I’d stick the last sentence in a @note.
There was a problem hiding this comment.
Ultimately killed the docs here.
We could repurpose/rename the |
|
Looks good! |
|
Incoming The new, second note links to https://www.mapbox.com/help/metrics-opt-out-for-users/, which will need updating. |
44952a8 to
09ab2ed
Compare
There was a problem hiding this comment.
We should be asserting that we’re on the main thread, using MGLAssertIsMainThread(), instead of using these Java annotation–like comments, which mean nothing.
There was a problem hiding this comment.
We do MGLAssertIsMainThread() in most cases here — I'll go ahead and do so for ensureMetricsOptoutExists, too.
There was a problem hiding this comment.
\r is extraneous on Unix-based systems. (On the Mac, it results in Windows-style selection, so I wouldn’t be surprised if VoiceOver trips over it in iOS.)
- Deprecate and no-op `+[MGLAccountManager mapboxMetricsEnabledSettingShownInApp]` - Check for attribution button hiding and make sure ToS are understood
8080b92 to
45a0f48
Compare

Changes the ℹ️ action sheet to include a "Mapbox Telemetry" entry that pops up a modal dialog with the telemetry on/off setting. This replaces "Adjust privacy settings", which kicked the user out to the system Settings.app.
Because the telemetry on/off setting is now always available (so long as the ℹ️ button is not hidden), there is no longer the requirement that the developer provide such a setting in their app's
Settings.bundleor specify inInfo.plistthat they were otherwise providing this setting in-app.Providing the telemetry setting in Settings.app (via
Settings.bundle) is still a recommended best-practice and completely supported, it's just no longer a requirement.Blocked by #3336, which causes this in-app setting changing to not take immediate effect./cc @1ec5