Building Error after updating to Xcode 14.3, now can't build even with 14.2

Yesterday I have updated to Xcode 14.3 (14E222b) and randomly my project stopped building giving this error:

/path/libBarcodeScanner.a(msi.o), building for iOS Simulator, but linking in object file built for iOS, file /path/libBarcodeScanner.a' for architecture arm64.

I have tried these solutions, which didn't help at all:

  • Clean DerivedData and Build
  • Run Xcode on Rosetta
  • Exclude Architectures
    • Any iOS Simulator SDKarm64
  • Build Active Architecture Only
    • → Already set Yes for Debug
  • Delete everything related to Xcode, and downgrade to Xcode 14.2.

I literally can't work right now because of this random error... Any help would be appreciated.

Accepted Answer

Looks like Apple changes not mentioned anywhere. Just follow the steps and it should work again:

  • Menubar → Product → Destination → Destination Architectures → Show Both
  • Run the project on a device you desire, but with Rosetta. (i.e., iPhone 14 Pro Max (Rosetta)

Same issue here.

is anyone aware how we can accomplish this via Xcodebuild / fastlane? I need to be able to run 14.3 in my pipeline via bitrise and I've been looking around for a solution but can't seem to find anything?

Same here, major issues on multiple projects. Some cant even build for dev. Some cant archive a build for export. All sorts of issues. Still have to use 14.2 SDK for all projects.

So I have been digging and found this: TN3117: Resolving architecture build errors on Apple silicon | Apple Developer Documentation/ And per this screenshot -> it shows this option for whats mentioned here, so I am wondering if it has to do running xcode 14.3 on intel vs apple silicon?

Building Error after updating to Xcode 14.3, now can't build even with 14.2
 
 
Q