Support override of attribution click action (iOS) #605
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
This override allows the application to provide a custom UX for Mapbox
telemetry settings and all required copyright information.
This improves the utility of the existing
getTelemetryEnabledandsetTelemetryEnabledmethods, as there is otherwise no means to providean alternative to the basic action sheet shown by default.
While it seemed a bit dubious to alter the click target of a UI element
that belongs to the underlying framework, it's apparently expected that
the application may override the button's visibility as that use case is
handled by the framework. (The application is prevented from running
unless a particular property is added to the info.plist.)
I explored that route as well, hiding the attribution button and
replacing it with an imitation, however the built-in button has features
that would be difficult to replicate in an externally added view. For
example, it repositions itself when the content insets change, and it's
always properly aligned with the Mapbox logo to the left.
Since the appearance and positioning of the built-in button is good and
appropriate for almost any application, but the action sheet is rather
basic and won't include whatever additional attributions an application
may require, overriding its click action appears the be the best option.