Build for simulator uses x86_64 architecture

I am trying to build a project that I have not built for quite a while, probably several years. I want to build for the XCode simulator. But when the simulator starts up, the app will not run because it needs to be updated to run on the current version of iOS. Looking at the build log, it is being built for x86_64, but I’m on an Apple Silicon Mac.

I have another project that I created more recently and I can build and run that in the XCode simulator without any problem.

I suspect that something is stuck in a cache somewhere in either XCode or the Corona Simulator from back when I last built this, which may have been on an old Intel Mac. How can I force the build to use the correct architecture?

I tried clearing the project sandbox. I tried deleting some cache files for Corona Simulator in Application Support in my Library folder. Nothing changed.

It’s a bit confusing, are you compiling a project for iOS or macOS? If it’s for iOS, there shouldn’t be an architecture problem. What error appears in the logs? Have you checked your build.settings file correctly? Which version of Solar2D are you using?