Unverified Commit a2a4e9ed authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

Revert "Build App.framework directly to build directory (#69612)" (#69641)

This reverts commit b7708831.
parent b7708831
...@@ -179,7 +179,7 @@ is set to release or run \"flutter build ios --release\", then re-run Archive fr ...@@ -179,7 +179,7 @@ is set to release or run \"flutter build ios --release\", then re-run Archive fr
${flutter_engine_flag} \ ${flutter_engine_flag} \
${local_engine_flag} \ ${local_engine_flag} \
assemble \ assemble \
--output="${BUILT_PRODUCTS_DIR}/" \ --output="${derived_dir}/" \
${performance_measurement_option} \ ${performance_measurement_option} \
-dTargetPlatform=ios \ -dTargetPlatform=ios \
-dTargetFile="${target_path}" \ -dTargetFile="${target_path}" \
...@@ -287,24 +287,26 @@ EmbedFlutterFrameworks() { ...@@ -287,24 +287,26 @@ EmbedFlutterFrameworks() {
project_path="${FLUTTER_APPLICATION_PATH}" project_path="${FLUTTER_APPLICATION_PATH}"
fi fi
# 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"
local flutter_ios_engine_folder="${project_path}/.ios/Flutter/engine"
if [[ ! -d ${flutter_ios_out_folder} ]]; then
flutter_ios_out_folder="${project_path}/ios/Flutter"
flutter_ios_engine_folder="${project_path}/ios/Flutter"
fi
AssertExists "${flutter_ios_out_folder}"
# Embed App.framework from Flutter into the app (after creating the Frameworks directory # Embed App.framework from Flutter into the app (after creating the Frameworks directory
# if it doesn't already exist). # if it doesn't already exist).
local xcode_frameworks_dir="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" local xcode_frameworks_dir="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
RunCommand mkdir -p -- "${xcode_frameworks_dir}" RunCommand mkdir -p -- "${xcode_frameworks_dir}"
RunCommand rsync -av --delete --filter "- .DS_Store/" "${BUILT_PRODUCTS_DIR}/App.framework" "${xcode_frameworks_dir}" RunCommand rsync -av --delete "${flutter_ios_out_folder}/App.framework" "${xcode_frameworks_dir}"
# Embed the actual Flutter.framework that the Flutter app expects to run against, # Embed the actual Flutter.framework that the Flutter app expects to run against,
# which could be a local build or an arch/type specific build. # which could be a local build or an arch/type specific build.
# Prefer the hidden .ios folder, but fallback to a visible ios folder if .ios
# doesn't exist.
local flutter_ios_engine_folder="${project_path}/.ios/Flutter/engine"
if [[ ! -d ${flutter_ios_engine_folder} ]]; then
flutter_ios_engine_folder="${project_path}/ios/Flutter"
fi
AssertExists "${flutter_ios_engine_folder}"
# Copy Xcode behavior and don't copy over headers or modules. # 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}/" RunCommand rsync -av --delete --filter "- .DS_Store/" --filter "- Headers/" --filter "- Modules/" "${flutter_ios_engine_folder}/Flutter.framework" "${xcode_frameworks_dir}/"
if [[ "$ACTION" != "install" || "$ENABLE_BITCODE" == "NO" ]]; then if [[ "$ACTION" != "install" || "$ENABLE_BITCODE" == "NO" ]]; then
......
...@@ -50,7 +50,7 @@ class CleanCommand extends FlutterCommand { ...@@ -50,7 +50,7 @@ class CleanCommand extends FlutterCommand {
deleteFile(flutterProject.ios.ephemeralDirectory); deleteFile(flutterProject.ios.ephemeralDirectory);
deleteFile(flutterProject.ios.generatedXcodePropertiesFile); deleteFile(flutterProject.ios.generatedXcodePropertiesFile);
deleteFile(flutterProject.ios.generatedEnvironmentVariableExportScript); deleteFile(flutterProject.ios.generatedEnvironmentVariableExportScript);
deleteFile(flutterProject.ios.deprecatedCompiledDartFramework); deleteFile(flutterProject.ios.compiledDartFramework);
deleteFile(flutterProject.linux.ephemeralDirectory); deleteFile(flutterProject.linux.ephemeralDirectory);
deleteFile(flutterProject.macos.ephemeralDirectory); deleteFile(flutterProject.macos.ephemeralDirectory);
......
...@@ -539,7 +539,7 @@ Future<void> diagnoseXcodeBuildFailure(XcodeBuildResult result, Usage flutterUsa ...@@ -539,7 +539,7 @@ Future<void> diagnoseXcodeBuildFailure(XcodeBuildResult result, Usage flutterUsa
logger.printError('Your Xcode project requires migration. See https://flutter.dev/docs/development/ios-project-migration for details.'); logger.printError('Your Xcode project requires migration. See https://flutter.dev/docs/development/ios-project-migration for details.');
logger.printError(''); logger.printError('');
logger.printError('You can temporarily work around this issue by running:'); logger.printError('You can temporarily work around this issue by running:');
logger.printError(' flutter clean'); logger.printError(' rm -rf ios/Flutter/App.framework');
return; return;
} }
......
...@@ -682,10 +682,7 @@ class IosProject extends FlutterProjectPlatform implements XcodeBasedProject { ...@@ -682,10 +682,7 @@ class IosProject extends FlutterProjectPlatform implements XcodeBasedProject {
.childDirectory('Flutter') .childDirectory('Flutter')
.childFile('Generated.xcconfig'); .childFile('Generated.xcconfig');
/// No longer compiled to this location. Directory get compiledDartFramework => _flutterLibRoot
///
/// Used only for "flutter clean" to remove old references.
Directory get deprecatedCompiledDartFramework => _flutterLibRoot
.childDirectory('Flutter') .childDirectory('Flutter')
.childDirectory('App.framework'); .childDirectory('App.framework');
......
...@@ -48,7 +48,7 @@ void main() { ...@@ -48,7 +48,7 @@ void main() {
projectUnderTest.ios.ephemeralDirectory.createSync(recursive: true); projectUnderTest.ios.ephemeralDirectory.createSync(recursive: true);
projectUnderTest.ios.generatedXcodePropertiesFile.createSync(recursive: true); projectUnderTest.ios.generatedXcodePropertiesFile.createSync(recursive: true);
projectUnderTest.ios.generatedEnvironmentVariableExportScript.createSync(recursive: true); projectUnderTest.ios.generatedEnvironmentVariableExportScript.createSync(recursive: true);
projectUnderTest.ios.deprecatedCompiledDartFramework.createSync(recursive: true); projectUnderTest.ios.compiledDartFramework.createSync(recursive: true);
projectUnderTest.linux.ephemeralDirectory.createSync(recursive: true); projectUnderTest.linux.ephemeralDirectory.createSync(recursive: true);
projectUnderTest.macos.ephemeralDirectory.createSync(recursive: true); projectUnderTest.macos.ephemeralDirectory.createSync(recursive: true);
...@@ -68,7 +68,7 @@ void main() { ...@@ -68,7 +68,7 @@ void main() {
expect(projectUnderTest.ios.ephemeralDirectory.existsSync(), isFalse); expect(projectUnderTest.ios.ephemeralDirectory.existsSync(), isFalse);
expect(projectUnderTest.ios.generatedXcodePropertiesFile.existsSync(), isFalse); expect(projectUnderTest.ios.generatedXcodePropertiesFile.existsSync(), isFalse);
expect(projectUnderTest.ios.generatedEnvironmentVariableExportScript.existsSync(), isFalse); expect(projectUnderTest.ios.generatedEnvironmentVariableExportScript.existsSync(), isFalse);
expect(projectUnderTest.ios.deprecatedCompiledDartFramework.existsSync(), isFalse); expect(projectUnderTest.ios.compiledDartFramework.existsSync(), isFalse);
expect(projectUnderTest.linux.ephemeralDirectory.existsSync(), isFalse); expect(projectUnderTest.linux.ephemeralDirectory.existsSync(), isFalse);
expect(projectUnderTest.macos.ephemeralDirectory.existsSync(), isFalse); expect(projectUnderTest.macos.ephemeralDirectory.existsSync(), isFalse);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment