Missing required architecture i386

Hi guys,

so we recently included a framework which does not support i386 architecture. This isnt exactly an issue initially, however, in our CI/CD lane, we've separated the build and test process.

During the build process, we build our app to 'generic/platform=iOS Simulator', this is so that we are able to feed the output app into multiple simulators to run tests.

Because of this, we're hitting into an error when linking about "missing required architecture i386 in file...". The thing is, we do not need to run on old i386 simulators, only the newer x86_64 ones.

That said, is there anyway we can tell xcodebuild to exclude i386 architectures? We tried updating the build settings under the 'Excluded Architectures', but we are still getting this error.
Answered by DTS Engineer in 669194022
Somewhere, the build system was told that you need i386. Ensure that all of the architecture settings in your app use the default values to evict this setting. If you have multiple targets or Xcode projects that are combined to build the app, verify this across all targets and projects:
  • ARCHS should be set to $(ARCHS_STANDARD)

  • EXCLUDED_ARCHS has no value set

  • VALID_ARCHS does not exist. This setting is deprecated, so if you see it in your project with Xcode 12, you should remove it entirely.

  • None of these should be customized for the iOS simulator

Accepted Answer
Somewhere, the build system was told that you need i386. Ensure that all of the architecture settings in your app use the default values to evict this setting. If you have multiple targets or Xcode projects that are combined to build the app, verify this across all targets and projects:
  • ARCHS should be set to $(ARCHS_STANDARD)

  • EXCLUDED_ARCHS has no value set

  • VALID_ARCHS does not exist. This setting is deprecated, so if you see it in your project with Xcode 12, you should remove it entirely.

  • None of these should be customized for the iOS simulator

Hi Edford,

Thank you for the reply, will comb through project settings to see what is up, but for now, I've actually added conditional compilation block, to prevent unsupported architecture from calling the framework's api. It wasn't just i386 - the framework doesnt support 32 bit in general, so armv7 as well
Missing required architecture i386
 
 
Q