diff --git a/dev/devicelab/bin/tasks/ios_content_validation_test.dart b/dev/devicelab/bin/tasks/ios_content_validation_test.dart index 21009e0049..ec1b89c407 100644 --- a/dev/devicelab/bin/tasks/ios_content_validation_test.dart +++ b/dev/devicelab/bin/tasks/ios_content_validation_test.dart @@ -20,14 +20,24 @@ Future main() async { ]); }); - checkDirectoryExists(path.join( + final String archivePath = path.join( flutterProject.rootPath, 'build', 'ios', 'archive', 'Runner.xcarchive', + ); + + checkDirectoryExists(path.join( + archivePath, 'Products', )); + + checkDirectoryExists(path.join( + archivePath, + 'dSYMs', + 'Runner.app.dSYM', + )); }); return TaskResult.success(null); diff --git a/packages/flutter_tools/lib/src/ios/mac.dart b/packages/flutter_tools/lib/src/ios/mac.dart index 2c804097ce..5358cca3c9 100644 --- a/packages/flutter_tools/lib/src/ios/mac.dart +++ b/packages/flutter_tools/lib/src/ios/mac.dart @@ -223,7 +223,8 @@ Future buildXcodeProject({ buildCommands.addAll([ '-workspace', globals.fs.path.basename(entity.path), '-scheme', scheme, - 'BUILD_DIR=${globals.fs.path.absolute(getIosBuildDirectory())}', + if (buildAction != XcodeBuildAction.archive) // dSYM files aren't copied to the archive if BUILD_DIR is set. + 'BUILD_DIR=${globals.fs.path.absolute(getIosBuildDirectory())}', ]); break; } diff --git a/packages/flutter_tools/test/commands.shard/hermetic/build_ipa_test.dart b/packages/flutter_tools/test/commands.shard/hermetic/build_ipa_test.dart index 4bc25fb174..c265855b79 100644 --- a/packages/flutter_tools/test/commands.shard/hermetic/build_ipa_test.dart +++ b/packages/flutter_tools/test/commands.shard/hermetic/build_ipa_test.dart @@ -92,7 +92,6 @@ void main() { '-quiet', '-workspace', 'Runner.xcworkspace', '-scheme', 'Runner', - 'BUILD_DIR=/build/ios', '-sdk', 'iphoneos', 'FLUTTER_SUPPRESS_ANALYTICS=true', 'COMPILER_INDEX_STORE_ENABLE=NO',