Skip to content

Migrate permission_handler_apple to Pigeon ProxyApi (address #1547 review) - #1552

Closed
rickdijk wants to merge 11 commits into
mainfrom
cursor/fix-pr-1547-review-593b
Closed

Migrate permission_handler_apple to Pigeon ProxyApi (address #1547 review)#1552
rickdijk wants to merge 11 commits into
mainfrom
cursor/fix-pr-1547-review-593b

Conversation

@rickdijk

@rickdijk rickdijk commented Aug 4, 2026

Copy link
Copy Markdown

Addresses review feedback from mvanbeusekom on #1547 and rebases the permission_handler_apple Pigeon ProxyApi / darwin/ migration onto current main.

  • Remove the unnecessary permission_handler_platform_interface: any dependency added to the example app in Migrate permission_handler_apple to Pigeon ProxyApi (darwin) #1547.
  • Merge PermissionManager and PermissionHandlerAppleImpl into PermissionHandlerApple, and drop the _requestInProgress / ERROR_ALREADY_REQUESTING_PERMISSIONS guard (no longer needed with ProxyApi InstanceManager).
  • Migrate iOS from legacy Obj-C MethodChannel strategies to Pigeon ProxyApi.
  • Add darwin/ Swift plugin (thin bridges) and lib/next/ Dart permission logic.
  • Enable cutover via sharedDarwinSource: true and dartPluginClass: PermissionHandlerApple.
  • Bump permission_handler_apple to 10.0.0 (minimum iOS 14.0 for darwin; 9.5.0 on main already shipped ACCESS_LOCAL_NETWORK).
  • Raise the permission_handler example app to an iOS 14.0 deployment target (Podfile, Xcode project, AppFrameworkInfo.plist), document the new minimum in the README and release permission_handler 14.0.0 for the breaking bump. Without this the app-facing example failed to build against the darwin Swift package.

Fixes review comments on #1547.

Pre-launch Checklist

  • I made sure the project builds.
  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is does not need version changes.
  • I updated CHANGELOG.md to add a description of the change.
  • I updated/added relevant documentation (doc comments with ///).
  • I rebased onto main.
  • I added new tests to check the change I am making, or this PR does not need tests.
  • I made sure all existing and new tests are passing.
  • I ran dart format . and committed any changes.
  • I ran flutter analyze and fixed any errors.
Open in Web Open in Cursor 

Rick van Dijk and others added 10 commits August 4, 2026 16:33
Define Apple framework types in pigeon/apple_permissions.dart and commit
the generated Dart and Swift artifacts used by the darwin migration.

Co-authored-by: Cursor <cursoragent@cursor.com>
Introduce PermissionHandlerDarwinPlugin, ProxyApiRegistrar, and per-framework
delegates that forward Pigeon calls to Apple APIs, plus SPM/podspec wiring.

Co-authored-by: Cursor <cursoragent@cursor.com>
…lass.

Port permission orchestration and handlers to lib/next/, using Pigeon
ProxyApi types with injectable proxies for testing.

Co-authored-by: Cursor <cursoragent@cursor.com>
…o 9.5.0.

Wire PermissionHandlerDarwinPlugin and PermissionHandlerApple as the iOS
implementation and add pigeon as a runtime dependency for ProxyApi types.

Co-authored-by: Cursor <cursoragent@cursor.com>
Cover permission status mapping, manager orchestration, and platform
delegation with mocked proxies in test/next/.

Co-authored-by: Cursor <cursoragent@cursor.com>
Point the Xcode SPM reference at darwin/, raise the deployment target to
14.0, and add a platform_interface dependency for tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
Describe the new architecture, Pigeon regeneration steps, and iOS 14
minimum deployment target for the darwin implementation.

Co-authored-by: Cursor <cursoragent@cursor.com>
Merge PermissionManager and PermissionHandlerAppleImpl into
PermissionHandlerApple, drop the legacy _requestInProgress guard now
that ProxyApi InstanceManager supports concurrent requests, and remove
the unnecessary platform_interface dependency from the example app.

Co-authored-by: Rick van Dijk <rickdijk@users.noreply.github.com>
Align the app-facing package constraint with the ProxyApi migration
version bump required after rebasing onto main (where 9.5.0 already
shipped ACCESS_LOCAL_NETWORK).

Co-authored-by: Rick van Dijk <rickdijk@users.noreply.github.com>
@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.42%. Comparing base (edf078c) to head (dcace2d).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1552   +/-   ##
=======================================
  Coverage   71.42%   71.42%           
=======================================
  Files           1        1           
  Lines          35       35           
=======================================
  Hits           25       25           
  Misses         10       10           
Flag Coverage Δ
unittests 71.42% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

The darwin Swift package requires iOS 14.0, which failed the app-facing
example's iOS release build at its 12.0/13.0 target. Bump the Podfile,
Xcode project and AppFrameworkInfo.plist, document the new minimum in
the README, and release permission_handler 14.0.0 for the breaking bump.

Co-authored-by: Rick van Dijk <rickdijk@users.noreply.github.com>
@rickdijk rickdijk closed this Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants