Repository navigation
fix(apple): report locationAlways as denied until Always has been requested - #1577
Merged
mvanbeusekom merged 1 commit intoOct 23, 2026
Merged
Conversation
…uested On iOS, locationAlways.status returned permanentlyDenied whenever only When In Use was granted, even before the plugin had asked for Always. Use the existing UserDefaultPermissionRequestedKey flag to return denied until Always has been requested. Fixes Baseflow#1145
mvanbeusekom
approved these changes
Oct 23, 2026
Member
|
Thank you for this contribution. Changes look good. |
3 of 5 tasks
Open
3 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
On iOS, Permission.locationAlways.status returns permanentlyDenied when only "When In Use" is granted, even if the app has never asked for "Always". In that state the "Always" prompt can still be shown, so apps that check the status first send users to Settings for no reason.
The plugin already sets UserDefaultPermissionRequestedKey when it requests "Always". This change uses it in the status check: denied until "Always" has been requested, permanentlyDenied after that. The request flow is unchanged.
Fixes #1145
Tested on an iOS 17.5 simulator with the example app:
Pre-launch Checklist
pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is does not need version changes.CHANGELOG.mdto add a description of the change.///).main.dart format .and committed any changes.flutter analyzeand fixed any errors.