Skip to content

Migrate permission_handler_apple iOS bridge to Pigeon#1545

Open
rickdijk wants to merge 6 commits into
Baseflow:mainfrom
rickdijk:refactor/dart_pigeon_migration
Open

Migrate permission_handler_apple iOS bridge to Pigeon#1545
rickdijk wants to merge 6 commits into
Baseflow:mainfrom
rickdijk:refactor/dart_pigeon_migration

Conversation

@rickdijk

@rickdijk rickdijk commented Jul 3, 2026

Copy link
Copy Markdown

Summary

  • Migrates iOS platform communication in permission_handler_apple from a hand-written MethodChannel to a type-safe Pigeon HostApi.
  • Adds PermissionHandlerApple as the Dart platform implementation, registered via dartPluginClass.
  • Removes the legacy iOS MethodChannel handler; Android and Windows continue to use MethodChannel unchanged.
  • Bumps permission_handler_apple to 9.5.0 with changelog and README notes for Pigeon codegen.

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.

Test plan

  • flutter analyze in permission_handler_apple
  • flutter build ios --no-codesign in permission_handler_apple/example
  • Manual smoke test on device: check permission status, request single permission, request multiple permissions, open app settings

Rick van Dijk and others added 6 commits June 30, 2026 14:11
…pple.

Introduces the HostApi definition and committed codegen output so native bridge work can build on a stable, type-safe contract.

Co-authored-by: Cursor <cursoragent@cursor.com>
Registers the generated HostApi in PermissionHandlerPlugin and delegates to PermissionManager while removing the legacy MethodChannel handler.

Co-authored-by: Cursor <cursoragent@cursor.com>
Registers the plugin via dartPluginClass and routes PermissionHandlerPlatform calls through the Pigeon HostApi client.

Co-authored-by: Cursor <cursoragent@cursor.com>
Documents the new codegen workflow and records the iOS bridge migration in the changelog.

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

This comment was marked as off-topic.

@rickdijk

rickdijk commented Jul 7, 2026

Copy link
Copy Markdown
Author

This PR's @HostApi approach (thin MethodChannel mirror with Obj-C strategies) has been superseded by a ProxyApi Darwin migration in a new implementation:

  • Pigeon @ProxyApi schemas expose Apple framework types in Dart
  • Swift plugin in darwin/ only registers ProxyApiRegistrar
  • Permission logic lives in Dart (lib/next/)
  • Cutover via sharedDarwinSource: true (legacy ios/ frozen, not compiled)

See permission_handler_apple 9.5.0 CHANGELOG and README for details. Maintainers: this PR can be closed in favor of the ProxyApi approach.

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