Revert "Exclude arm64 from valid iOS simulators (#73458)" (#73511)
This reverts commit 273630c09dea7e4abdca34904318640e4f5a2488.
diff --git a/dev/devicelab/bin/tasks/ios_content_validation_test.dart b/dev/devicelab/bin/tasks/ios_content_validation_test.dart
index 7539580..e84b346 100644
--- a/dev/devicelab/bin/tasks/ios_content_validation_test.dart
+++ b/dev/devicelab/bin/tasks/ios_content_validation_test.dart
@@ -182,43 +182,6 @@
await flutter('clean');
});
- section('Build app for simulator with all available architectures');
-
- // Apple Silicon ARM simulators not yet supported.
- // Prove (on Xcode 12) Flutter knows to exclude this architecture.
- await inDirectory(flutterProject.rootPath, () async {
- await flutter('build', options: <String>[
- 'ios',
- '--simulator',
- '--no-codesign',
- '--verbose',
- ], environment: <String, String>{
- 'FLUTTER_XCODE_ONLY_ACTIVE_ARCH': 'NO'
- });
- });
-
- final String simulatorAppFrameworkBinary = path.join(
- flutterProject.rootPath,
- 'build',
- 'ios',
- 'iphonesimulator',
- 'Runner.app',
- 'Frameworks',
- 'App.framework',
- 'App',
- );
-
- final String archs = await fileType(simulatorAppFrameworkBinary);
- if (!archs.contains('Mach-O 64-bit dynamically linked shared library x86_64')) {
- throw TaskResult.failure('Unexpected architecture');
- }
-
- section('Clean build');
-
- await inDirectory(flutterProject.rootPath, () async {
- await flutter('clean');
- });
-
section('Archive');
await inDirectory(flutterProject.rootPath, () async {
diff --git a/packages/flutter_tools/bin/podhelper.rb b/packages/flutter_tools/bin/podhelper.rb
index ae81f7c..a5d720b 100644
--- a/packages/flutter_tools/bin/podhelper.rb
+++ b/packages/flutter_tools/bin/podhelper.rb
@@ -68,9 +68,6 @@
# When deleted, the deployment version will inherit from the higher version derived from the 'Runner' target.
# If the pod only supports a higher version, do not delete to correctly produce an error.
build_configuration.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET' if inherit_deployment_target
-
- # Apple Silicon ARM simulators not yet supported.
- build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64 i386'
end
end
diff --git a/packages/flutter_tools/lib/src/ios/mac.dart b/packages/flutter_tools/lib/src/ios/mac.dart
index 65c3564..5ce33fb 100644
--- a/packages/flutter_tools/lib/src/ios/mac.dart
+++ b/packages/flutter_tools/lib/src/ios/mac.dart
@@ -250,7 +250,7 @@
if (buildForDevice) {
buildCommands.addAll(<String>['-sdk', 'iphoneos']);
} else {
- buildCommands.addAll(<String>['-sdk', 'iphonesimulator']);
+ buildCommands.addAll(<String>['-sdk', 'iphonesimulator', '-arch', 'x86_64']);
}
}
diff --git a/packages/flutter_tools/lib/src/ios/xcodeproj.dart b/packages/flutter_tools/lib/src/ios/xcodeproj.dart
index 5f7c992..7cf04c1 100644
--- a/packages/flutter_tools/lib/src/ios/xcodeproj.dart
+++ b/packages/flutter_tools/lib/src/ios/xcodeproj.dart
@@ -209,9 +209,6 @@
if (useMacOSConfig) {
// ARM not yet supported https://github.com/flutter/flutter/issues/69221
xcodeBuildSettings.add('EXCLUDED_ARCHS=arm64');
- } else {
- // Apple Silicon ARM simulators not yet supported.
- xcodeBuildSettings.add('EXCLUDED_ARCHS[sdk=iphonesimulator*]=arm64 i386');
}
for (final MapEntry<String, String> config in buildInfo.toEnvironmentConfig().entries) {
diff --git a/packages/flutter_tools/test/general.shard/ios/xcodeproj_test.dart b/packages/flutter_tools/test/general.shard/ios/xcodeproj_test.dart
index 4052a0c..30b3b68 100644
--- a/packages/flutter_tools/test/general.shard/ios/xcodeproj_test.dart
+++ b/packages/flutter_tools/test/general.shard/ios/xcodeproj_test.dart
@@ -683,14 +683,12 @@
final String contents = config.readAsStringSync();
expect(contents.contains('ARCHS=armv7'), isTrue);
- expect(contents.contains('EXCLUDED_ARCHS[sdk=iphonesimulator*]=arm64 i386'), isTrue);
final File buildPhaseScript = fs.file('path/to/project/ios/Flutter/flutter_export_environment.sh');
expect(buildPhaseScript.existsSync(), isTrue);
final String buildPhaseScriptContents = buildPhaseScript.readAsStringSync();
expect(buildPhaseScriptContents.contains('ARCHS=armv7'), isTrue);
- expect(buildPhaseScriptContents.contains('"EXCLUDED_ARCHS[sdk=iphonesimulator*]=arm64 i386"'), isTrue);
});
testUsingOsxContext('sets TRACK_WIDGET_CREATION=true when trackWidgetCreation is true', () async {
diff --git a/packages/flutter_tools/test/integration.shard/build_ios_config_only_test.dart b/packages/flutter_tools/test/integration.shard/build_ios_config_only_test.dart
index 7382a46..a2b86f5 100644
--- a/packages/flutter_tools/test/integration.shard/build_ios_config_only_test.dart
+++ b/packages/flutter_tools/test/integration.shard/build_ios_config_only_test.dart
@@ -41,7 +41,10 @@
// Config is updated if command succeeded.
expect(generatedConfig, exists);
- expect(generatedConfig.readAsStringSync(), contains('DART_OBFUSCATION=true'));
+ expect(generatedConfig.readAsStringSync(), allOf(
+ contains('DART_OBFUSCATION=true'),
+ isNot(contains('EXCLUDED_ARCHS')),
+ ));
// file that only exists if app was fully built.
final File frameworkPlist = fileSystem.file(