Baseflow / Baseflow/flutter-permission-handler
locationAlways permission isGranted returns true when location permission is set to "while using"
- Dominant language
- Dart
- Stars
- 2.2k
- Forks
- 970
- Avg merge
- 14h 22m
- Merged PRs (30d)
- 2
Description
## 🐛 Bug Report
First off, thank you for taking the time to support this plugin. It's been a huge help for us and I know handling permissions on multiple platforms and versions is a pain.
We've been having some trouble around the locationAlways permission, and for us we're stuck on this problem on iOS: If the app's location permission is set to "while using", the result of `await Permission.locationAlways.isGranted` will return true.
### Expected behavior
The expected behavior is that if the location permission is set to anything other than "always" (including "while using"), then `await Permission.locationAlways.isGranted` should return false.
### Reproduction steps
1. Request location in your app and select the "while using" option
2. Run the following statement after this `final isGranted = await Permission.locationAlways.isGranted`
3. Confirm that `isGranted` has a value of true
### Configuration
* iOS 15
* iPhone Mini 12
* Flutter 3.7.7
* Dart 2.19.1
**Version:** permission_handler - 10.2.0
**Platform:**
- [x] :iphone: iOS
- [ ] :robot: Android
Contributor guide
Assessment
This issue has not been assessed yet.