Built on macOS 10.12.3, but app requires 10.12.4
I recently upgraded my macbook to 10.12.3. My application builds the same as before, but when I try to launch it from finder, I get an error dialog that says: "You can't use this version of the application "Application.app" with this version of macOS. You have macOS 10.12.3. The application requires macOS 10.12.4 or later."
If I try "open Application.app" from the terminal I get: "LSOpenURLsWithRole() failed with error -10825 for the file /Users/me/repo/Application/build/Application.app". I can't find any info about what that error code actually means.
I build with g++ and cmake and deploy with macdeployqt.
I can make the application run if I launch the binary directly without the app bundle, but that's not a solution.
Which version of Qt and Xcode are you using ?
Qt 5.8.0. Xcode 8.1 (8B62)
Updated Xcode to 8.2.1. No change.
The first thing I would check is the settings for the minimum system version. The setting is inside the application bundle in the file 'info.plist'.
I set this parameter because I know the stuff I work on will not run below 10.7.0 (the last time I checked at least). I don't know if there is a default value for this setting if it is missing from the 'info.plist' file (I think the default is a really old version of OS X). This file is (or can be) automatically generated with Qt so maybe there is a problem with what is put into this entry.
When I set this higher than the OS X version I am currently running I get the same error you describe.
Setting LSMinimumSystemVersion wasn't enough. Had to also export MACOSX_DEPLOYMENT_TARGET. Something changed, since this wasn't necessary before.