Skip to content

[CP-stable]Fix layout for macOS frameworks for code assets#181607

Merged
auto-submit[bot] merged 1 commit into
flutter:flutter-3.38-candidate.0from
flutteractionsbot:cp-stable-17e65b6f510591b1a49392b805334779c81a148b
Feb 2, 2026
Merged

[CP-stable]Fix layout for macOS frameworks for code assets#181607
auto-submit[bot] merged 1 commit into
flutter:flutter-3.38-candidate.0from
flutteractionsbot:cp-stable-17e65b6f510591b1a49392b805334779c81a148b

Conversation

@flutteractionsbot

@flutteractionsbot flutteractionsbot commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

This pull request is created by automatic cherry pick workflow
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

Issue Link:

What is the link to the issue this cherry-pick is addressing?

#178623

Changelog Description:

Explain this cherry pick in one line that is accessible to most Flutter developers. See best practices for examples

When using an ffi plugin on macOS, generated frameworks have the wrong structure.

Impact Description:

What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)

Apps using ffi plugins on macOS will get App Store rejections.

Workaround:

Is there a workaround for this issue?

No

Risk:

What is the risk level of this cherry-pick?

  • Low
  • Medium
  • High

Test Coverage:

Are you confident that your fix is well-tested by automated tests?

  • Yes
  • No

Validation Steps:

What are the steps to validate that this fix works?

  1. Create a flutter macOS app
  2. Add an ffi plugin, like path_provider_foundation
  3. Try to upload it to the App Store

To implement code assets, Flutter tooling converts `.dylib` files
emitted by hooks into Apple frameworks. The format of frameworks is
slightly different between macOS and other Apple platforms, and this
comment explains the correct format for macOS:


https://github.com/flutter/flutter/blob/f954fb79dd1570d0d05c033df85b4041fddb151f/packages/flutter_tools/lib/src/isolated/native_assets/macos/native_assets.dart#L134-L142

Currently, the link from `Resources` to `Versions/Current/Resources` is
incorrectly generated to `Versions/A/Resources`. This fixes that to
generate both links to `Versions/Current`.

Closes flutter#178623.
@flutteractionsbot flutteractionsbot added the cp: review Cherry-picks in the review queue label Jan 28, 2026
@flutteractionsbot flutteractionsbot requested a review from a team as a code owner January 28, 2026 17:32
@flutteractionsbot

Copy link
Copy Markdown
Contributor Author

@vashworth please fill out the PR description above, afterwards the release team will review this request.

@flutter-dashboard

Copy link
Copy Markdown

This pull request was opened from and to a release candidate branch. This should only be done as part of the official Flutter release process. If you are attempting to make a regular contribution to the Flutter project, please close this PR and follow the instructions at Tree Hygiene for detailed instructions on contributing to Flutter.

Reviewers: Use caution before merging pull requests to release branches. Ensure the proper procedure has been followed.

@github-actions github-actions Bot added tool Affects the "flutter" command-line tool. See also t: labels. a: desktop Running on desktop team-ios Owned by iOS platform team labels Jan 28, 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

The pull request includes a minor refactoring in native_assets.dart to improve code readability and efficiency by caching a directory lookup. Additionally, it enhances test coverage in native_assets_test.dart by adding specific assertions to verify the symlink structure of macOS frameworks. These changes contribute to better code maintainability and ensure the correct packaging of native assets.

@stuartmorgan-g stuartmorgan-g 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.

LGTM

@justinmc justinmc 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.

CPLGTM 👍

@justinmc justinmc added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 2, 2026
@auto-submit auto-submit Bot merged commit fba81bf into flutter:flutter-3.38-candidate.0 Feb 2, 2026
140 checks passed
auto-submit Bot pushed a commit that referenced this pull request Feb 6, 2026
Only one cherry pick: #181607. It doesn't touch the engine, so no need to change engine.version.
auto-submit Bot pushed a commit that referenced this pull request Feb 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: desktop Running on desktop autosubmit Merge PR when tree becomes green via auto submit App cp: review Cherry-picks in the review queue team-ios Owned by iOS platform team tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants