Because we use a delegate method to handle this we'd need to either:
add an object that can intercept and forward delegate methods
or add hooks to the SDK (either at the core or iOS level) that an extension could use to provide this behavior.
I favor the latter - and this could be considered as a part of a larger extension integration effort, though it would be straight-forward to add a custom delegate object (and even easier just to add something to the SDK).
Another interesting option in the mean-time might be to use class_addMethod to add default functionality to an existing class/delegate - and this could be done via an extension. Though this might be a bit too "magic".
See https://github.com/mapbox/mapbox-plugins-android/pull/1000#issuecomment-506776713 and @fabian-guerra's subsequent comment.
Because we use a delegate method to handle this we'd need to either:
I favor the latter - and this could be considered as a part of a larger extension integration effort, though it would be straight-forward to add a custom delegate object (and even easier just to add something to the SDK).
Another interesting option in the mean-time might be to use
class_addMethod
to add default functionality to an existing class/delegate - and this could be done via an extension. Though this might be a bit too "magic".