Steps to reproduce
pluginsSupportArmSimulator() in xcode_project.dart uses the regex EXCLUDED_ARCHS.*arm64 to determine if any CocoaPods target excludes arm64 simulators. This regex incorrectly matches arm64e as a substring of arm64, causing Flutter to add arm64 to EXCLUDED_ARCHS in Generated.xcconfig even when no plugin actually excludes arm64.
Many common pods set EXCLUDED_ARCHS = arm64e armv7 armv7s in their build settings. Since arm64e contains arm64 the regex produces a false positive, and Generated.xcconfig ends up with:
EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386 arm64
This prevents building for arm64 simulators on Apple Silicon Macs, producing an error.
- Create a Flutter project with pods that set
EXCLUDED_ARCHS = arm64e armv7 armv7s
- Run
flutter run on an Apple Silicon Mac targeting an iOS Simulator
- Observe
Generated.xcconfig contains EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386 arm64
- Build fails with architecture mismatch error
Expected results
Generated.xcconfig ends up with:
EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386 arm64e
Actual results
Generated.xcconfig ends up with:
EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386 arm64
Code sample
--
Screenshots or Video
No response
Logs
No response
Flutter Doctor output
--
Steps to reproduce
pluginsSupportArmSimulator()inxcode_project.dartuses the regexEXCLUDED_ARCHS.*arm64to determine if any CocoaPods target excludes arm64 simulators. This regex incorrectly matchesarm64eas a substring ofarm64, causing Flutter to addarm64toEXCLUDED_ARCHSinGenerated.xcconfigeven when no plugin actually excludes arm64.Many common pods set
EXCLUDED_ARCHS = arm64e armv7 armv7sin their build settings. Sincearm64econtainsarm64the regex produces a false positive, andGenerated.xcconfigends up with:This prevents building for arm64 simulators on Apple Silicon Macs, producing an error.
EXCLUDED_ARCHS = arm64e armv7 armv7sflutter runon an Apple Silicon Mac targeting an iOS SimulatorGenerated.xcconfigcontainsEXCLUDED_ARCHS[sdk=iphonesimulator*]=i386 arm64Expected results
Generated.xcconfigends up with:Actual results
Generated.xcconfigends up with:Code sample
--
Screenshots or Video
No response
Logs
No response
Flutter Doctor output
--