Skip to content

[macOS] Add FlutterPluginRegistrar.valuePublished(byPlugin:) just like iOS#187348

Closed
bernaferrari wants to merge 0 commit into
flutter:masterfrom
bernaferrari:macos-registrar-value-published
Closed

[macOS] Add FlutterPluginRegistrar.valuePublished(byPlugin:) just like iOS#187348
bernaferrari wants to merge 0 commit into
flutter:masterfrom
bernaferrari:macos-registrar-value-published

Conversation

@bernaferrari

@bernaferrari bernaferrari commented May 30, 2026

Copy link
Copy Markdown
Contributor

Fix #186911

image

Adds valuePublishedByPlugin: to the macOS FlutterPluginRegistrar protocol and forwards it through FlutterEngineRegistrar to the engine's existing published plugin value lookup.

This makes the macOS plugin registrar API == iOS registrar API, allowing shared Darwin plugin code to retrieve values published by other plugins without platform-specific workarounds.

The new macOS registrar comment is the same as iOS.

@bernaferrari
bernaferrari requested a review from a team as a code owner May 30, 2026 17:02
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label May 30, 2026
@github-actions github-actions Bot added engine flutter/engine related. See also e: labels. platform-macos Building on or for macOS specifically a: desktop Running on desktop team-macos Owned by the macOS platform team labels May 30, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds the valuePublishedByPlugin: method to the macOS FlutterPluginRegistrar protocol and implements it in FlutterEngine to allow plugins to retrieve values published by other plugins. Unit tests have been added to verify this functionality. Feedback suggests using stringByAppendingPathComponent: instead of stringByAppendingString: for path manipulation in the test code to ensure robust path construction.

@bernaferrari
bernaferrari force-pushed the macos-registrar-value-published branch from 4d0442e to 9cf7904 Compare May 30, 2026 17:05
@github-actions github-actions Bot removed the CICD Run CI/CD label May 30, 2026
@bernaferrari bernaferrari changed the title Add macOS registrar published value lookup [macOS] Add FlutterPluginRegistrar.valuePublished(byPlugin:) just like iOS May 30, 2026
@LouiseHsu
LouiseHsu requested a review from hellohuanlin June 4, 2026 21:31
@bernaferrari
bernaferrari force-pushed the macos-registrar-value-published branch from 9cf7904 to 4dc2342 Compare June 15, 2026 21:19
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Jun 15, 2026
@bernaferrari

Copy link
Copy Markdown
Contributor Author

I rebased, let's see if Google Testing begins now.

@bernaferrari
bernaferrari force-pushed the macos-registrar-value-published branch from 4dc2342 to 2df82f9 Compare June 16, 2026 02:29
@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 16, 2026
@LongCatIsLooong LongCatIsLooong added the CICD Run CI/CD label Jun 18, 2026
@LongCatIsLooong

Copy link
Copy Markdown
Contributor

/cc @hellohuanlin could you take a look at the google testing failure?

@hellohuanlin

Copy link
Copy Markdown
Contributor

The failure was just time-out. I've kicked off re-run and see how it goes

@bernaferrari

Copy link
Copy Markdown
Contributor Author

Now it passed. Thanks!

@bernaferrari bernaferrari added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 16, 2026
@auto-submit

auto-submit Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/187348, because The base commit of the PR is older than 7 days and can not be merged. Please merge the latest changes from the main into this branch and resubmit the PR.

@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jul 16, 2026
@bernaferrari
bernaferrari force-pushed the macos-registrar-value-published branch from 2df82f9 to cfb8130 Compare July 16, 2026 20:45
@bernaferrari

Copy link
Copy Markdown
Contributor Author

I pressed the wrong button and accidentally killed the branch somehow instead of rebasing (I think I rebased on top of origin/main instead of origin/master and that broke the tree). And apparently there is no way to solve, so I cloned it under another PR.

pull Bot pushed a commit to AbhiShake1/flutter that referenced this pull request Jul 17, 2026
…e iOS (flutter#189614)

Fix flutter#186911

<img width="1536" height="1024" alt="image"
src="https://github.com/user-attachments/assets/bd266853-c939-412f-97de-0a0c3d1e1da6"
/>

Adds `valuePublishedByPlugin:` to the macOS `FlutterPluginRegistrar`
protocol and forwards it through `FlutterEngineRegistrar` to the
engine's existing published plugin value lookup.

This makes the macOS plugin registrar API == iOS registrar API, allowing
shared Darwin plugin code to retrieve values published by other plugins
without platform-specific workarounds.

The new macOS registrar comment is the same as iOS.

---

Note: This replaces flutter#187348, which was accidentally closed during a
rebase.

Co-authored-by: Jenn Magder <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: desktop Running on desktop CICD Run CI/CD engine flutter/engine related. See also e: labels. platform-macos Building on or for macOS specifically team-macos Owned by the macOS platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[macOS] Support FlutterPluginRegistrar.valuePublished(byPlugin:)

3 participants