Fix and document the Swift Package Manager section of the main README - #1555
Merged
Merged
Conversation
The "iOS - Swift Package Manager" section of permission_handler/README.md is where most users will look, but it no longer covers what the package does. This brings it up to date and points to the permission_handler_apple README for the full detail, rather than duplicating documentation that would drift. Follow-up to Baseflow#1554, as discussed there. The Info.plist key table was wrong in four places, checked against the plistKeys of each macro in Package.swift: calendarWriteOnly and calendarFullAccess were listed as two separate rows when both map to the same macro (PERMISSION_EVENTS_FULL_ACCESS, either key enables both); photos, location and bluetooth were each missing a second key they also accept; and locationWhenInUse shared a row with location despite being a narrower, separate macro. The section also claimed "no additional configuration file is needed", which stopped being true with Baseflow#1554. Separately, PERMISSION_HANDLER_VERBOSE was documented in both this README and permission_handler_apple/README.md as always logging "the app root". That only holds without a permission_handler.yaml; with one, it logs the active flavor instead. Fixed in both places. permission_handler_apple/README.md is the README this section now points users to, so a few gaps found in the same pass are closed there too: strict: false was never explained (only strict: true was), select's validation added in Baseflow#1554 had one line covering one of its four rules, and select --app / --derived-data were undocumented despite being what makes the command usable in CI. Adds to permission_handler/README.md: how Info.plist files are located and merged across build configurations, a short flavors example pointing to the full per-flavor documentation, the Xcode.app case, and a troubleshooting block for the silent-denied failure mode behind Baseflow#1548. No code changes, so no version bump and no CHANGELOG.md entry.
10 tasks
mvanbeusekom
approved these changes
Aug 11, 2026
mvanbeusekom
left a comment
Member
There was a problem hiding this comment.
LGTM! Thank you @Pachebel for also picking this up!
HasanAlqaisi
pushed a commit
to HasanAlqaisi/flutter-permission-handler
that referenced
this pull request
Sep 15, 2026
…Baseflow#1555) The "iOS - Swift Package Manager" section of permission_handler/README.md is where most users will look, but it no longer covers what the package does. This brings it up to date and points to the permission_handler_apple README for the full detail, rather than duplicating documentation that would drift. Follow-up to Baseflow#1554, as discussed there. The Info.plist key table was wrong in four places, checked against the plistKeys of each macro in Package.swift: calendarWriteOnly and calendarFullAccess were listed as two separate rows when both map to the same macro (PERMISSION_EVENTS_FULL_ACCESS, either key enables both); photos, location and bluetooth were each missing a second key they also accept; and locationWhenInUse shared a row with location despite being a narrower, separate macro. The section also claimed "no additional configuration file is needed", which stopped being true with Baseflow#1554. Separately, PERMISSION_HANDLER_VERBOSE was documented in both this README and permission_handler_apple/README.md as always logging "the app root". That only holds without a permission_handler.yaml; with one, it logs the active flavor instead. Fixed in both places. permission_handler_apple/README.md is the README this section now points users to, so a few gaps found in the same pass are closed there too: strict: false was never explained (only strict: true was), select's validation added in Baseflow#1554 had one line covering one of its four rules, and select --app / --derived-data were undocumented despite being what makes the command usable in CI. Adds to permission_handler/README.md: how Info.plist files are located and merged across build configurations, a short flavors example pointing to the full per-flavor documentation, the Xcode.app case, and a troubleshooting block for the silent-denied failure mode behind Baseflow#1548. No code changes, so no version bump and no CHANGELOG.md entry.
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.
The "iOS - Swift Package Manager" section of
permission_handler/README.mdis where most userswill look, but it no longer covers what the package does. This brings it up to date and points to
the
permission_handler_appleREADME for the full detail, rather than duplicating documentationthat would drift. It also fixes a small factual error the same audit turned up in the
permission_handler_appleREADME itself.Follow-up to #1554, as discussed there.
Corrections
The
Info.plistkey table was wrong in four places. Checked against theplistKeysof each macroin
Package.swift:calendarWriteOnly/calendarFullAccessPERMISSION_EVENTS_FULL_ACCESS, and either enables bothphotosNSPhotoLibraryUsageDescriptiononlyNSPhotoLibraryAddUsageDescriptionlocationNSLocationWhenInUseUsageDescriptiononly, shared a row withlocationWhenInUseNSLocationAlwaysAndWhenInUseUsageDescription;locationWhenInUsenow has its own row, sincePERMISSION_LOCATION_WHENINUSEis a separate macro with a narrower key setbluetoothNSBluetoothAlwaysUsageDescriptiononlyNSBluetoothPeripheralUsageDescriptionThe section also claimed "no additional configuration file is needed", which stopped being true
with #1554.
Separately,
PERMISSION_HANDLER_VERBOSEwas documented (in both this README andpermission_handler_apple/README.md) as always logging "the app root". That's only the casewithout a
permission_handler.yaml; with one, it logs the active flavor instead. Fixed the wordingin both places.
While in there I also found a few gaps in
permission_handler_apple/README.mditself — the READMEthis PR points users to, so it seemed worth closing them in the same pass rather than leaving a
link to documentation with holes in it:
strict: falsewas never explained — onlystrict: true's behaviour was documented.select's validation (added in Add opt-in per-flavor permissions for Swift Package Manager builds (2/2) #1554: one build configuration can't belong to two flavors,configurationsmust be a list, flavor names must be strings,strictmust be a boolean) had asingle line covering the first rule and nothing for the other three.
select --appand--derived-dataweren't documented at all, despite being what makes thecommand usable in CI, which is where it's most likely to matter.
Additions
INFOPLIST_FILEis read from the Xcode project and.xcconfigfiles, and keys are merged across build configurations — worth stating, because the merge is
what makes the flavors section below necessary.
permission_handler.yamlexample and theselectcommand, witha link to the full per-flavor documentation.
/as their working directory and cannot bedetected, so they need
PERMISSION_HANDLER_INFO_PLIST. This is a recurring source of issues andwas not mentioned anywhere in this README.
deniedwith no visible error — the failure mode behind [Bug] Automatic permission detection doesn't work in apps using flavors #1548. Since Xcode discards manifestoutput, the block shows the
swift package dump-packageinvocation that surfaces it.permission_handler_appleREADME, which is where the environment variablesand the per-flavor workflow are documented in full.
No code changes, so no version bump and no
CHANGELOG.mdentry.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, or this PR does not need one — docs-only, no behavior changed.///).main.dart format .and committed any changes.flutter analyzeand fixed any errors.