Closed JulianBissekkou closed 1 year ago
I digged into the code and found the problem.
The location permission is requested when we set the location render mode to "COMPASS" or "GPS". This is done in Convert.interpretMapboxMapOptions
.
By default we are using MyLocationRenderMode.COMPASS
which causes the request of the location permission also if you set myLocationEnabled
to false
.
I would love to contribute to this, but I would like to get guidance for the potnetial fixes.
My proposal:
Make myLocationRenderMode
default to NORMAL
and add an assertion that you have to set myLocationEnabled
to true when using any other MyLocationRenderMode
.
Some apps might want to display an app without user location, in that case the permission
NSLocationWhenInUseUsageDescription
should not be required and the app should not crash on startup.This would be consistent with android