diff --git a/dev/devicelab/bin/tasks/module_test_ios.dart b/dev/devicelab/bin/tasks/module_test_ios.dart index 85cb3b42b7..2707b605fa 100644 --- a/dev/devicelab/bin/tasks/module_test_ios.dart +++ b/dev/devicelab/bin/tasks/module_test_ios.dart @@ -79,6 +79,26 @@ Future main() async { ); } + section('Build ephemeral host app when SDK is on external disk'); + + // Pretend the SDK was on an external drive with stray "._" files in the xcframework + // and build again. + Directory(path.join( + projectDir.path, + '.ios', + 'Flutter', + 'engine', + 'Flutter.xcframework', + '._ios-arm64_x86_64-simulator', + )).createSync(recursive: true); + + await inDirectory(projectDir, () async { + await flutter( + 'build', + options: ['ios', '--no-codesign', '--simulator', '--debug'], + ); + }); + section('Clean build'); await inDirectory(projectDir, () async { diff --git a/packages/flutter_tools/bin/podhelper.rb b/packages/flutter_tools/bin/podhelper.rb index 7f11888644..1ef6b55a0d 100644 --- a/packages/flutter_tools/bin/podhelper.rb +++ b/packages/flutter_tools/bin/podhelper.rb @@ -60,6 +60,7 @@ def flutter_additional_ios_build_settings(target) # Profile can't be derived from the CocoaPods build configuration. Use release framework (for linking only). configuration_engine_dir = build_configuration.type == :debug ? debug_framework_dir : release_framework_dir Dir.new(configuration_engine_dir).each_child do |xcframework_file| + continue if xcframework_file.start_with?(".") # Hidden file, possibly on external disk. if xcframework_file.end_with?("-simulator") # ios-arm64_x86_64-simulator build_configuration.build_settings['FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]'] = "\"#{configuration_engine_dir}/#{xcframework_file}\" $(inherited)" elsif xcframework_file.start_with?("ios-") # ios-armv7_arm64