Mac requires OS X 10.12?

When I try to run a release build created for mac I receive the following message:

You can’t use this version of the application “Frostfire” with this version of OS X.
You have OS X 10.11.6. The application requires OS X 10.12 or later.

I create this build like this:
openfl build mac -final -clean

At the same time if I try just to run supposedly the same version of the game with "openfl test mac -final" it works fine (although its icon is layered with a semi-transparent crossed circle hinting that not everything is totally fine).

Am I doing something wrong or we really need OS X 10.12 now? Is there a way to lower the requirement? Could it be something about Xcode settings?

Are you building and running on the same machine?

We might be doing something wrong that is enforcing a minimum version, but this is not intentional. We used to use old versions of macOS for doing our builds to absolutely ensure we didn’t raise the minimum version required, but that because too difficult to maintain, as iOS builds tend to require a new version

Yes, on the same machine.

That 10.12 requirement is rather unfortunate as Sierra was released not so long ago and I guess there are many people who haven’t upgraded yet. Do you think “rebuild mac” might help (to embed my older osx version number)?

Yes, try that, and then we need to figure out how to avoid the minimum version requirement in our builds :frowning:

It’s strange, though, we should be setting a minimum version here:

and here (for good measure):

1 Like

Ok, “rebuild mac” didn’t help, but your links gave me an idea, I tried it and it works!

I just set MACOSX_DEPLOYMENT_TARGET environment variable to 10.6 (an arbitrary value) and now the built application starts normally! I have no idea why it works, I checked that the variable didn’t have value before. To be honest I don’t even know how haxedefs are related to environment variables…

Without setting an environment variable, try something like:

<log info="Deployment Target: ${MACOSX_DEPLOYMENT_TARGET}" />

in a project file. That will print out the value, somehow(?) it’s getting set to something higher. We’ll want to check before it reaches the OpenFL/Lime haxelibs, since the value gets set there if undefined

Without setting the environment variable the output is “Deployment Target:” i.e. at that moment it is undefined.

I am on the latest version of Haxe and OpenFL and I am encountering this error even while setting

<haxedef name="MACOSX_DEPLOYMENT_TARGET" value="10.6" if="mac" />

How can I get around this?

Does this occur when you perform a build on the local machine, or does this occur when building on one Mac, and testing in an older version later? Thanks :slight_smile:

On the same machine.

Any updates on this? I am still unable to build without getting that error. The only way to run it is with
openfl test mac

but trying to make a build is still a no go.

Could you try and update to Lime 4.0.2, recently released, and see if it behaves differently

Thank you :slight_smile:

Yeah I did that earlier still the same. It is still saying I can’t use it on the mac that created the app.

How can I set the minimum target in my project file? Would that get around the problem?

I had assumed that your local machine would default to your current OS version if it is not set, but there is a define called MACOSX_DEPLOYMENT_TARGET which is supposed to control this.

Is anyone else using OS X < 10.12?

I am not able to get Xcode running in my older Mac VM at the moment, but I am able to use release OpenFL and Lime versions with the Neko target, which means that our native binaries should be built for macOS 10.7 or greater as intended

Perhaps there’s something additional needed in the default flags used when we build for C++? Does openfl test neko work on your machine?

No I am getting this error and have not been able to track down what is causing it:

Uncaught exception - std@module_read

The only way I can get my app to run is by:

openfl test mac

What about an OpenFL sample?