Android ACCESS_LOCAL_NETWORK, package monorepo pubspec.yaml#1541
Open
zeyus wants to merge 59 commits into
Open
Android ACCESS_LOCAL_NETWORK, package monorepo pubspec.yaml#1541zeyus wants to merge 59 commits into
ACCESS_LOCAL_NETWORK, package monorepo pubspec.yaml#1541zeyus wants to merge 59 commits into
Conversation
* feat(apple): create SPM source directory structure * feat(apple): move ObjC sources to SPM-compatible structure * feat(apple): add public header for SPM plugin registration * feat(apple): move PrivacyInfo.xcprivacy to SPM sources * feat(apple): add Package.swift for Swift Package Manager support * feat(apple): update podspec to reference SPM source structure * chore(apple): ignore SPM build artifacts * docs: add SPM setup instructions to README * fix(apple): move Package.swift to correct SPM location (ios/permission_handler_apple/) * fix(apple): add missing PERMISSION_PHOTOS_ADD_ONLY and PERMISSION_LOCATION_ALWAYS defines * fix(apple): use forward declaration in public header to avoid missing internal import * fix(example): bump compileSdk to 36, AGP to 8.9.1, Gradle to 8.11.1 * fix(apple): add explicit UIKit import to strategies that use UIApplication under SPM * feat(apple): auto-detect permissions from Info.plist in Package.swift Package.swift now walks up the directory tree from its own location to find the app's Info.plist and enables each permission define when the corresponding usage description key is present. This mirrors the CocoaPods workflow: adding NSCameraUsageDescription to Info.plist is all that is needed to activate PERMISSION_CAMERA, with no extra configuration files or terminal commands. Environment variables remain supported as an explicit override (priority over Info.plist), which covers PermissionGroup.notification and criticalAlerts that have no required Info.plist key. Users must clear DerivedData once after changing Info.plist so Xcode re-evaluates the manifest: rm -rf ~/Library/Developer/Xcode/DerivedData * docs: update SPM setup instructions to use Info.plist auto-detection Replace the launchctl setenv / pre-action script approach with the new Info.plist-based mechanism: permissions are now enabled automatically when the corresponding usage description key is present in Info.plist, which is already required for any permission to work at runtime. Document the two permissions without an Info.plist key (notification, criticalAlerts) as the only case still requiring an env var. * chore(example): update iOS example app and remove plan artifact - Add all permission usage description keys to Info.plist so the SPM Info.plist auto-detection covers all permissions out of the box - Comment out the Siri entitlement (requires a paid Apple Developer account; uncomment to test PERMISSION_ASSISTANT) - Update AppDelegate to modern FlutterImplicitEngineDelegate pattern - Bump Podfile iOS platform to 13.0 - Remove docs/superpowers/plans/2026-05-05-spm-support.md (internal planning artifact not intended for the public repo) * chore(apple): bump version to 9.4.8 and update CHANGELOG * fix(apple): correct SPM permission flag mapping for photos and calendarWriteOnly - PERMISSION_PHOTOS now triggers on NSPhotoLibraryAddUsageDescription alone, since PhotoPermissionStrategy (which handles photosAddOnly) compiles under PERMISSION_PHOTOS — without this, photosAddOnly silently fell back to UnknownPermissionStrategy when NSPhotoLibraryUsageDescription was absent - PERMISSION_EVENTS_FULL_ACCESS now also triggers on NSCalendarsWriteOnlyAccessUsageDescription (iOS 17+), enabling calendarWriteOnly which requires PERMISSION_EVENTS || PERMISSION_EVENTS_FULL_ACCESS in native code - Sync podspec version to 9.4.8 - Restore NSCameraUsageDescription in example Info.plist (lost during rewrite) - Add NSCalendarsWriteOnlyAccessUsageDescription to example Info.plist * docs: add calendarWriteOnly to SPM permission table in README * fix(example): remove NSSiriUsageDescription and document permission constraints Siri requires the com.apple.developer.siri entitlement; including NSSiriUsageDescription without it crashes the app on launch under SPM. Added a README section listing permissions that cannot be tested on simulator or without special entitlements. * fix(apple): enable notifications and criticalAlerts by default under SPM These permissions have no required Info.plist key so the previous logic always compiled them out (defaultValue "0"), causing permanentlyDenied to be returned without ever showing a system dialog. They are now enabled by default and can be opted out via env var set to "0". * fix(apple): revert criticalAlerts to opt-in under SPM criticalAlerts requires a special Apple entitlement; compiling it into every app by default would add dead code for apps that don't use it. Only PERMISSION_NOTIFICATIONS defaults to enabled (no entitlement needed). * docs: clarify SPM special cases for notification and criticalAlerts - Add both permissions to the Info.plist table with notes - Distinguish export (terminal) vs launchctl setenv (Xcode GUI) - Explain why criticalAlerts is opt-in (Apple entitlement required) * chore(example): enable SPM in Xcode project for iOS example app Flutter auto-generated FlutterGeneratedPluginSwiftPackage reference when running with --enable-swift-package-manager. * fix(example): align Java source/target compatibility to VERSION_17 AGP 8.x + Kotlin 1.9+ enforce JVM-target consistency; compileJava was still on 1.8 while compileKotlin used 17, causing the build to fail.
Fix incorrect Android SDK parameter name in documentation. "completeSdkVersion" is not a valid Android parameter. The correct name is "compileSdkVersion". This prevents developer confusion when following the troubleshooting guide.
…low#1488) After version 8.0.0, permission handler no longer uses all permissions on iOS, but this was not explained clearly in the README. This is my attempt to fix that small mistake.
> > Co-authored-by: Novarest
ACCESS_LOCAL_NETWORK, package monorepo pubspec.yaml
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.
Adds the android 17
ACCESS_LOCAL_NETWORKpermission.I have also done the following:
dart format .)BREAKING: This changes the compileSDK to 37
Note: This work was done by me, not AI.