Newbie: macos: pkgbuild: incompatible version

Dear forum,

New on macos. Need to create a .pkg file on the command line. The tooling seems to be pkgbuild(1) and productbuild(1). My problem is that while I can create .pkg files both using pkgbuild and productbuild and also install them any attempt to start the application fails with a You can’t use this version of the application “OpenCPN” with this version of MacOS. You have MacOS 10.15.7, the application requires MacOS 12.0 or later.

The message is bogus, application is built with 10.15 compatibility level and works fine if started from the command line.

I have tried adding the LSMinimunSystemVersion key to Info.plist before running pkgbuild. The key is available in the installed package, but no change.

Have also tried to add the allowed-os-versions to a distribution file and feed it into productbuild. Same result, it requires 12.0 and refuses to start from GUI.

Any hints out there?

1 Like