Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Build App and native asset frameworks for Add to App FlutterPluginRegistrant#183136

Open
vashworth wants to merge 3 commits intoflutter:masterfrom
vashworth:swiftpm_add2app_p5
Open

Build App and native asset frameworks for Add to App FlutterPluginRegistrant#183136
vashworth wants to merge 3 commits intoflutter:masterfrom
vashworth:swiftpm_add2app_p5

Conversation

@vashworth
Copy link
Contributor

Generates XCFrameworks for the App and any native assets and places them with the FlutterPluginRegistrant Swift package.

├── FlutterPluginRegistrant
│   ├── Debug/Profile/Release
│   │   ├── Frameworks
│   │   │   ├── App.xcframework
│   │   │   ├── NativeAssets
│   │   │   │   ├── my_native_asset.xcframework

Build artifacts are stored in a .cache directory to make incremental builds faster.

Fixes #181209.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

@vashworth vashworth requested a review from a team as a code owner March 2, 2026 21:31
@vashworth vashworth requested review from stuartmorgan-g and removed request for a team March 2, 2026 21:31
@github-actions github-actions bot added tool Affects the "flutter" command-line tool. See also t: labels. team-ios Owned by iOS platform team labels Mar 2, 2026
Copy link
Contributor

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

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 introduces the capability to build App.xcframework and native asset frameworks for 'Add to App' scenarios, primarily enhancing the build swift-package command. The core logic is encapsulated in a new AppFrameworkAndNativeAssetsDependencies class, which handles the creation of XCFrameworks for different build configurations and platforms. The changes are well-structured and include corresponding updates to build targets and tests. My feedback focuses on improving code conciseness and adding a clarifying comment for better maintainability.

@vashworth vashworth requested a review from a team as a code owner March 3, 2026 03:29
@github-actions github-actions bot added the team-macos Owned by the macOS platform team label Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-ios Owned by iOS platform team team-macos Owned by the macOS 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.

[SwiftPM Add2App] Build App.xcframework

1 participant