mapbox / mapbox/mapbox-maps-flutter
Requests GPS permission on load
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 380
- Forks
- 204
- PR merge metrics
- No merged PRs in 30d
Description
Instantly asks for GPS permission when using Map, without further calling code to activate Puck.
Tested on iOS
Edit: After some tries to isolate the problem i found the trigger:
.updateSettings(LocationComponentSettings(enabled: false)
I guess this is not what should trigger a gps permission request from iOS.
Used 0.6.x before and there things worked as expected. Now updated to 2.1.0 and this behaviour started to show.
We want to have control over when gps permission is shown, as we want to be hyper nice to our users and give a lot of explanation why we need the permission beforehand and NOT just throw the iOS (with Plist reason string) dialog immediately at their faces on app start.
Environment:
Flutter 3.22.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision b0850beeb2 (2 weeks ago) • 2024-07-16 21:43:41 -0700
Engine • revision 235db911ba
Tools • Dart 3.4.4 • DevTools 2.34.3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the iOS behavior on Flutter 3.22.3 with map setup followed by .updateSettings(LocationComponentSettings(enabled: false)), comparing the reported 2.1.0 behavior with 0.6.x if available. Trace when the Map and Puck/location component are initialized and when the permission request occurs. Done means disabling the location component does not request GPS permission until calling code explicitly activates Puck.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100