How to build and run game on iOS simulator

Hi all,

I’m attempting to follow the iOS guide but I’m running into some issues. Here is where I’m at so far:

# Boot the simulator.
xcrun simctl boot "iPhone 12"  # iOS 14.4 right now.

# Build the game for the simulator.
bob --archive --platform armv7-darwin --architectures x86_64-ios build bundle --variant debug

# Install the app.
xcrun simctl install booted "build/default/mygame.app"

# Run the simulator.
open "`xcode-select --print-path`/Applications/Simulator.app

All these steps succeed, but when I try to open the app on the iOS simulator, it just instantly crashes.

As you can see, I am not signing the app here, as per the instructions.

When I build the app and deploy it to App Store Connect / TestFlight, it runs happily, so I figure it’s something specifically wrong with the simulator build.

Another interesting note is I can’t install the ipa, only the app. When I try to install the ipa, I get this seemingly unrelated error:

An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.

I should also note that if I build the app via the editor, using the same settings as in the wiki, that I run into the same problem.

Does anyone have a working setup here?

Thanks!

1 Like

Unfortunately, you’ve hit a bug:

We haven’t had time to look into it yet I’m afraid

Ah no worries, I’ll get the Android side of things all set up and test in an Android emulator instead. I just need a mobile platform, Android or iOS shouldn’t matter. Thanks!

2 Likes