-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't build iOS due to -arch arm64 flag if xcode project has EXCLUDED_ARCHS = "arm64" #811
Comments
Update: while I wrote the issue, I restarted the build without EXCLUDED_ARCHS both in the Podfile and XCode settings. The build succeeded. I guess we no longer have the legacy code that required that EXCLUDED_ARCHS setting. Still, the issue might be relevant for other developers. |
Thanks for reporting and for investing time to troubleshot. I'd assume that in such setting you also need to use rosetta for running simulator on arm-based macs? Do you have some example repositories with this configuration that we could try? I wonder what expo/rn cli could do differently here to allow this. Building for all possible architecture doesn't seem like a sensible choice as this makes the whole build twice as slow. Therefore I'm surprised these tools don't rely on some configuration options for this to work |
Yes, this, old cocoapods which aren't updated to use arm, by excluding arm64 from arch are forced to build and run through rosetta. I looked through the pods we use, it's only Flipper that is not updated and thus the app won't build without that EXCLUDED_ARCHS in the Podfile. Also, I found that the EXCLUDED_ARCHS setting makes the iOS 18 simulator behave unstable and hangs up the app on any modal window (iOS 17.5 works fine, it's XCode 16 introduced this bug). So guess, in the future no one will use it, and we simply should get rid of Flipper. So it's not a high-priority bug for you to fix. I still can make a sample repository for you to try if you would like to. :) |
No, the build won't run for all possible architectures as most XCode projects have ONLY_ACTIVE_ARCH set to YES. That's probably why there's no need for this configuration option in expo/rn cli. |
Description
The app build fails on iOS if it has the EXCLUDED_ARCHS = "arm64" setting in Xcode.
It builds Android normally, the app also builds okay in the simulator from the react-native run-ios command.
Logs
The build logs show a multitude of errors for every CocoaPod used, an example:
Our Podfile includes the lines:
Thus the arm64 is the excluded arch. This setting is quite common in React Native projects with legacy code.
But the command line invocation of the Radon IDE for xcodebuild has -arch arm64 flag which conflicts with the setting and causes the build to fail:
A suggestion would be to allow setting custom command line invocation parameters.
Environment
The text was updated successfully, but these errors were encountered: