MacOs App Store pkg Productbuild -- add a property to product list (without Xcode)

1.9k Views Asked by At

Dear macOS Productbuild and pkgbuild experts (without/not using the Xcode)

This is my last hurdle after going through a huge learning journey on product build and pkgbuild

I get the error from Appstore

  • "ITMS-90264: The lowest minimum system version [none] in the Product Definition Property List must equal the 'LSMinimumSystemVersion' value [10.9] in the 'Info.plist'. "

In my App/Contents/Info.Plist there is

`<key>LSMinimumSystemVersion</key>
  <string>10.9</string>`

Now when I build the package as per the following sequence

 `pkgbuild --analyze --root "./pkgbuild/app_path/" app.plist
    
    pkgbuild --root "${ROOTFOLDER}" --identifier "${IDENTIFIER}" --version ${VERSION} --    component-plist ./app.plist  --install-location "/Applications" \
     --sign "${IDENTITY}" \
     "${PKGNAME}.pkg"
    
    #productbuild --synthesize --package Final.pkg distribution.xml
    
    productbuild --distribution ./distribution.xml --resources ~/Desktop/resources --identifier com.myorg.uniqueid --version ${VERSION} --sign "${IDENTITY}" --product ~/Desktop/modInfo.plist outputFinal.pkg`

Question Where do I incorporate the the lowest minimum system version none in the Product Definition Property List " to 10.9 ? and what do I need to insert in what file, how?

Deeply appreciate if I can get some pointers.

Thanks in advance

3

There are 3 best solutions below

9
l'L'l On BEST ANSWER

You need to include a product_definition.plist with the minimum os version. It should look similar to:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>os</key>
  <array>
    <string>10.9.0</string>
  </array>
</dict>
</plist>

Your productbuild command would become:

productbuild \
    --distribution ./distribution.xml \
    --resources ~/Desktop/resources \
    --identifier com.myorg.uniqueid \
    --version ${VERSION} \
    --sign "${IDENTITY}" \
    --productbuild --product ~/Desktop/product_definition.plist --component build/Release/Your.app /Applications outputFinal.pkg

So basically we've changed your modInfo.plist to the correct name (product_definition.plist) and included the key to handle the minimum os version.

0
tech_geek On

To conclude this thread, and for help to future queries on this very topic, here is a summary

  1. productbuild with both options --distribution distribution.xml and --product product_definition.plist do not work together -- I am using 10.15.7 Catalina MacOS ; product definition is ignored

  2. Ended up using --component component path with --product product_definition.plist to get accepted by Appstore

  3. Since from step 2, I am now without distribution.xml, I lost license/eula ability

I decided to address Eula in my app itself under the menu.

My deepest thanks to I'L'I for patient pointers

Too many hassles with AppStore and little documentation and running around in cycles is not worth the time. Thanks Apple!

0
Dave E On

If you are using --distribution ./distribution.xml

You need to add <os-version min="10.9"/> to the distribution.xml file

see: https://developer.apple.com/library/archive/documentation/DeveloperTools/Reference/DistributionDefinitionRef/Chapters/Distribution_XML_Ref.html#//apple_ref/doc/uid/TP40005370-CH100-SW33