if you're building for iOS Simulator on a Mac with Apple Silicon, you encounter issues with architecture mismatches, you have to use simulator with Rosetta
Go to the menu Product → Destination → Show All Run Destinations.
this show you all available simulator, choose one with Rosetta and retry (clean build folder, build ...)
Xcode : 15.4 macOs : 14.6 (M2)