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?

I was building for iOS on my Mac Mini (Apple Silicon). I think I figured this problem out: I made a copy of the project and removed all the Game Center code and then it built correctly and ran in the simulator. So I think the Game Center plugin was causing the issue. Apple hasn’t done an Intel Mac for almost 5 years now so I don’t know why this plugin is not available in arm so it could run in the simulator.

I’m now going to try building for my iPhone. I tried yesterday, but the app failed at runtime because the plugin was apparently not included. I will try again and save the error message if that happens again. I don’t want to try submitting a build to the app store if I’m not sure it’s going to work.

In this case, I don’t think it has to do with Intel or Silicon architecture, but with the Game Center plugin. It might be outdated or incompatible with newer versions of iOS. But do the tests and if anything, post the results here so someone can help, in case it doesn’t work.

I built for my device, but I still get the runtime error: module gameNetwork not found.

In looking at the build log, I see the following lines which suggest that there is some kind of error with the plugin:

ld: warning: section __DATA/__cfstring is not pointer aligned in /Users/dethier/Desktop/Cushion Caroms.app/.build/CoronaProvider.gameNetwork.apple/libgamenetwork-apple.a[arm64]2
ld: warning: no platform load command found in ‘/Users/dethier/Desktop/Cushion Caroms.app/.build/CoronaProvider.gameNetwork.apple/libgamenetwork-apple.a[arm64]2’, assuming: iOS
ld: warning: mixed ObjC ABI, /Users/dethier/Desktop/Cushion Caroms.app/.build/CoronaProvider.gameNetwork.apple/libgamenetwork-apple.a[arm64]2 compiled without category class properties
ld: warning: no platform load command found in ‘/Users/dethier/Desktop/Cushion Caroms.app/.build/CoronaProvider.gameNetwork.apple/libgamenetwork-apple.a[arm64]3’, assuming: iOS
ld: warning: no platform load command found in ‘/Users/dethier/Desktop/Cushion Caroms.app/.build/CoronaProvider.gameNetwork.apple/libgamenetwork-apple.a[arm64]4’, assuming: iOS

I believe my build settings are correct. Here are the relevant parts:

entitlements = { [ “com.apple.developer.game-center” ] = true, },

and

plugins = {
[ “CoronaProvider.gameNetwork.apple” ] = {
publisherId = “com.coronalabs”,
supportedPlatforms = { iphone = true }
},
},

So how do I get this to build? I tried doing a build for the app store, but the build log has the same errors, so I’m not certainly going to submit that.

The error is as if you haven’t loaded the plugin. Are you using the latest version of Solar2D? Review the plugin documentation; perhaps you missed something.

I’m using version 2026.3727, which is the latest version. I copied and pasted the build.settings entries from the documentation. The plugin has not been updated for 12 years and the build settings for the plugin have not been updated for 7 years. It seems more likely that something with XCode changed and the plugin needs to be updated.

That’s probably correct.