Disable Execution Memory Protection

Hi there,

I am trying to validate a game with Apple, via Xcode, because I want to test my application on test mac running MacOS. A prerequisite for this is that I turn on the Hardened runtime feature. When I do this and I run the game in Xcode (in debug mode or a build) the game crashes. Only when I turn on the feature “Disable Execution Memory Protection” does the game run properly. Apple says this is an important security feature so I want to make sure that there is no way around this.

Some additional notes around this:

  • I also tried to create a new empty application and create an XCode project from that, add the Hardened runtime and the game then still crashes. Only when I turn on the feature “Disable Execution Memory Protection” does the game run.
  • I have a valid apple developer account and all the prerequisites around that.
  • I am running running Unity and Xcode on a Macbook running MacOS Big Sur.

So my question is do I really need to enable the "Disable Execution Memory Protection” in order for my game to work on MacOS?

Mono currently requires it. You wouldn’t have to do it if you used IL2CPP scripting backend.

Thanks, Tautvydas-Zilys. This worked!