Deprecate build ios-framework --universal (#69720)
diff --git a/dev/devicelab/bin/tasks/build_ios_framework_module_test.dart b/dev/devicelab/bin/tasks/build_ios_framework_module_test.dart index 012ca86..cbd8b6d 100644 --- a/dev/devicelab/bin/tasks/build_ios_framework_module_test.dart +++ b/dev/devicelab/bin/tasks/build_ios_framework_module_test.dart
@@ -67,7 +67,7 @@ 'build', options: <String>[ 'ios-framework', - '--xcframework', + '--universal', '--output=$outputDirectoryName' ], ); @@ -352,6 +352,7 @@ options: <String>[ 'ios-framework', '--cocoapods', + '--universal', '--force', // Allow podspec creation on master. '--output=$cocoapodsOutputDirectoryName' ],
diff --git a/packages/flutter_tools/lib/src/commands/build_ios_framework.dart b/packages/flutter_tools/lib/src/commands/build_ios_framework.dart index 4dade81..13785ab 100644 --- a/packages/flutter_tools/lib/src/commands/build_ios_framework.dart +++ b/packages/flutter_tools/lib/src/commands/build_ios_framework.dart
@@ -74,16 +74,17 @@ 'By default, all build configurations are built.' ) ..addFlag('universal', - help: 'Produce universal frameworks that include all valid architectures. ' - 'This is true by default.', - defaultsTo: true, - negatable: true + help: '(Deprecated) Produce universal frameworks that include all valid architectures. ' + 'This option will be removed in a future version of Flutter.', + negatable: true, + hide: true, ) ..addFlag('xcframework', - help: 'Produce xcframeworks that include all valid architectures (Xcode 11 or later).', + help: 'Produce xcframeworks that include all valid architectures.', + defaultsTo: true, ) ..addFlag('cocoapods', - help: 'Produce a Flutter.podspec instead of an engine Flutter.framework (recommended if host app uses CocoaPods).', + help: 'Produce a Flutter.podspec instead of an engine Flutter.xcframework (recommended if host app uses CocoaPods).', ) ..addOption('output', abbr: 'o', @@ -152,11 +153,16 @@ } if (!boolArg('universal') && !boolArg('xcframework')) { - throwToolExit('--universal or --xcframework is required.'); + throwToolExit('--xcframework or --universal is required.'); } if (boolArg('xcframework') && globals.xcode.majorVersion < 11) { throwToolExit('--xcframework requires Xcode 11.'); } + if (boolArg('universal')) { + globals.printError('--universal has been deprecated to support Apple ' + 'Silicon ARM simulators and will be removed in a future version of ' + 'Flutter. Use --xcframework instead.'); + } if (buildInfos.isEmpty) { throwToolExit('At least one of "--debug" or "--profile", or "--release" is required.'); }