Search code examples
macospropertiespkgbuildproductbuild

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


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


Solution

  • 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.