-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Build App.framework directly to build directory #69612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
||
| # Prefer the hidden .ios folder, but fallback to a visible ios folder if .ios | ||
| # doesn't exist. | ||
| local flutter_ios_out_folder="${project_path}/.ios/Flutter" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed flutter_ios_out_folder. flutter_ios_engine_folder initialization was moved down a few lines to where it's used.
| AssertExists "${flutter_ios_engine_folder}" | ||
|
|
||
| # Copy Xcode behavior and don't copy over headers or modules. | ||
| RunCommand rsync -av --delete --filter "- .DS_Store/" --filter "- Headers/" --filter "- Modules/" "${flutter_ios_engine_folder}/Flutter.framework" "${xcode_frameworks_dir}/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's where .DS_Store is already being filtered out of Flutter.framework rsync.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably need to also filter this out of the asset detection logic too, separate issue though
| /// No longer compiled to this location. | ||
| /// | ||
| /// Used only for "flutter clean" to remove old references. | ||
| Directory get deprecatedCompiledDartFramework => _flutterLibRoot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open to naming suggestions here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable to me. Might want to TODO removal after a stable release cycle or so
jonahwilliams
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| logger.printError('Your Xcode project requires migration. See https://flutter.dev/docs/development/ios-project-migration for details.'); | ||
| logger.printError(''); | ||
| logger.printError('You can temporarily work around this issue by running:'); | ||
| logger.printError(' rm -rf ios/Flutter/App.framework'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot about this one.
This reverts commit b770883.
Description
Since #51453 we no longer need to build the App.framework to a known directory like
project/ios/Flutter/App.framework. Instead, build the frameworks directly to the build products directory. For example,flutter build ios -v --simulatorwill build to/build/ios/Debug-iphonesimulator/App.framework.Additionally, this sets us up to no longer need to
lipothe simulator and non-simulator frameworks together since they will build to different directories.flutter/packages/flutter_tools/lib/src/build_system/targets/ios.dart
Lines 103 to 112 in cb67513
When Apple Silicon ships and ARM simulators are supported, this
lipowill fail since the simulator and real device frameworks will both containarm64.Also stop copying the
.DS_Storedirectories, while we're at it (already done withFlutter.framework). These files shouldn't be copied, and it adds spew during the installation phase:Related Issues
#60118
Tests
No direct tests of the new location. Already many many integration tests that will blow up in the compiled dart code or flutter_assets are missing.