diff --git a/dev/devicelab/bin/tasks/module_test_ios.dart b/dev/devicelab/bin/tasks/module_test_ios.dart index b5c0d011b4..31f1e1af31 100644 --- a/dev/devicelab/bin/tasks/module_test_ios.dart +++ b/dev/devicelab/bin/tasks/module_test_ios.dart @@ -57,6 +57,8 @@ Future main() async { ); }); + checkDirectoryExists(path.join(projectDir.path, '.ios', 'Flutter', 'engine', 'Flutter.xcframework')); + final Directory ephemeralIOSHostApp = Directory(path.join( projectDir.path, 'build', @@ -90,6 +92,8 @@ Future main() async { ); }); + checkDirectoryExists(path.join(projectDir.path, '.ios', 'Flutter', 'engine', 'Flutter.xcframework')); + if (!exists(ephemeralIOSHostApp)) { return TaskResult.failure('Failed to build ephemeral host .app'); } @@ -126,6 +130,7 @@ Future main() async { if (!exists(ephemeralSimulatorHostApp)) { return TaskResult.failure('Failed to build ephemeral host .app'); } + checkFileExists(path.join(ephemeralSimulatorHostApp.path, 'Frameworks', 'Flutter.framework', 'Flutter')); if (!exists(File(path.join( ephemeralSimulatorHostApp.path, @@ -170,6 +175,7 @@ Future main() async { options: ['ios', '--no-codesign', '-v'], ); }); + checkDirectoryExists(path.join(projectDir.path, '.ios', 'Flutter', 'engine', 'Flutter.xcframework')); final bool ephemeralHostAppWithCocoaPodsBuilt = exists(ephemeralIOSHostApp); @@ -189,6 +195,7 @@ Future main() async { } checkFileExists(path.join(ephemeralIOSHostApp.path, 'Frameworks', 'device_info.framework', 'device_info')); + checkFileExists(path.join(ephemeralIOSHostApp.path, 'Frameworks', 'Flutter.framework', 'Flutter')); // Static, no embedded framework. checkDirectoryNotExists(path.join(ephemeralIOSHostApp.path, 'Frameworks', 'google_sign_in.framework')); diff --git a/packages/flutter_tools/bin/xcode_backend.sh b/packages/flutter_tools/bin/xcode_backend.sh index 388bfcf5c5..10bac66a94 100755 --- a/packages/flutter_tools/bin/xcode_backend.sh +++ b/packages/flutter_tools/bin/xcode_backend.sh @@ -144,8 +144,7 @@ is set to release or run \"flutter build ios --release\", then re-run Archive fr # TODO(jmagman): use assemble copied engine in add-to-app. if [[ -e "${project_path}/.ios" ]]; then - RunCommand rm -rf -- "${derived_dir}/engine/Flutter.framework" - RunCommand cp -r -- "${flutter_framework}" "${derived_dir}/engine" + RunCommand rsync -av --delete --filter "- .DS_Store" "${flutter_framework}" "${derived_dir}/engine" fi RunCommand pushd "${project_path}" > /dev/null