Unverified Commit 3145c835 authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

Deprecate build ios-framework --universal (#69720)

parent ae0a9cb5
...@@ -67,7 +67,7 @@ Future<void> main() async { ...@@ -67,7 +67,7 @@ Future<void> main() async {
'build', 'build',
options: <String>[ options: <String>[
'ios-framework', 'ios-framework',
'--xcframework', '--universal',
'--output=$outputDirectoryName' '--output=$outputDirectoryName'
], ],
); );
...@@ -352,6 +352,7 @@ Future<void> main() async { ...@@ -352,6 +352,7 @@ Future<void> main() async {
options: <String>[ options: <String>[
'ios-framework', 'ios-framework',
'--cocoapods', '--cocoapods',
'--universal',
'--force', // Allow podspec creation on master. '--force', // Allow podspec creation on master.
'--output=$cocoapodsOutputDirectoryName' '--output=$cocoapodsOutputDirectoryName'
], ],
......
...@@ -74,16 +74,17 @@ class BuildIOSFrameworkCommand extends BuildSubCommand { ...@@ -74,16 +74,17 @@ class BuildIOSFrameworkCommand extends BuildSubCommand {
'By default, all build configurations are built.' 'By default, all build configurations are built.'
) )
..addFlag('universal', ..addFlag('universal',
help: 'Produce universal frameworks that include all valid architectures. ' help: '(Deprecated) Produce universal frameworks that include all valid architectures. '
'This is true by default.', 'This option will be removed in a future version of Flutter.',
defaultsTo: true, negatable: true,
negatable: true hide: true,
) )
..addFlag('xcframework', ..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', ..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', ..addOption('output',
abbr: 'o', abbr: 'o',
...@@ -152,11 +153,16 @@ class BuildIOSFrameworkCommand extends BuildSubCommand { ...@@ -152,11 +153,16 @@ class BuildIOSFrameworkCommand extends BuildSubCommand {
} }
if (!boolArg('universal') && !boolArg('xcframework')) { if (!boolArg('universal') && !boolArg('xcframework')) {
throwToolExit('--universal or --xcframework is required.'); throwToolExit('--xcframework or --universal is required.');
} }
if (boolArg('xcframework') && globals.xcode.majorVersion < 11) { if (boolArg('xcframework') && globals.xcode.majorVersion < 11) {
throwToolExit('--xcframework requires Xcode 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) { if (buildInfos.isEmpty) {
throwToolExit('At least one of "--debug" or "--profile", or "--release" is required.'); throwToolExit('At least one of "--debug" or "--profile", or "--release" is required.');
} }
......
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