Skip to content

Implement flutter build macos-framework to allow macOS apps to be embedded in non-Flutter host-apps #104866

@jmagman

Description

@jmagman

Implement flutter build macos-framework command to create XCFrameworks for the compiled dart code App.xcframework, the FlutterMacOS.xcframework engine, and each plugin, to then be embedded into a host app via add-to-app.

See iOS analog flutter build ios-framework.

  1. Implement command to be run in normal macOS apps (non-modules)
    a. Resurrect _produceXCFrameworkFromUniversal logic from Methods in build_ios_framework for universal and XCFrameworks #69736 since FlutterMacOS.framework is not published as an XCFramework
  2. Add macOS version of build_ios_framework_module_test
  3. Add macOS docs like https://docs.flutter.dev/development/add-to-app/ios/project-setup and https://docs.flutter.dev/development/add-to-app/ios/add-flutter-screen
  4. Add to samples

Note: to completely support macOS add-to-app we would need to create a module template, and allow it to be embedded in the host app via CocoaPods #80339. However, flutter build ios-framework works in a normal Flutter app without using a Flutter module #70647. Start by supporting the minimum, and extracting the frameworks from a normal macOS Flutter app.

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: existing-appsIntegration with existing apps via the add-to-app flowplatform-macBuilding on or for macOS specificallytoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions