5

I've got the following two .pkg files:

  • MyApp-v1_3_0.pkg
  • MyApp-v1_2_0.pkg

Built using the following two commands respectively:

  • pkgbuild --identifier <my identifier> --version 1.3.0 --root ./MyAppBundle --install-location '/Applications/MyApp test' --component-plist MyAppBundle.plist MyApp-v1_3_0.pkg
  • pkgbuild --identifier <my identifier> --version 1.2.0 --root ./MyAppBundle --install-location '/Applications/MyApp test' --component-plist MyAppBundle.plist MyApp-v1_2_0.pkg

In the MyAppBundle.plist file, I have this:

<?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">
<array>
    <dict>
        <key>BundleHasStrictIdentifier</key>
        <true/>
        <key>BundleIsRelocatable</key>
        <true/>
        <key>BundleIsVersionChecked</key>
        <true/>
        <key>BundleOverwriteAction</key>
        <string>upgrade</string>
        <key>RootRelativeBundlePath</key>
        <string>MyApp.app</string>
    </dict>
</array>
</plist>

As you can see BundleIsVersionChecked is set to true and yet when I run MyApp-v1_2_0.pkg after MyApp-v1_3_0.pkg, it happily downgrades.

How do I stop it from downgrading?

Ash
  • 2,021
  • 2
  • 26
  • 59
  • PS: My ultimate goal is to crate a product archive using `productbuild` and these need to be versioned such that downgrades are not possible. If there's an alternate way of accomplishing this, then let me know. – Ash Apr 07 '15 at 07:17
  • did you ever figure out a solution to this problem? I'm facing the same issue. – Chris Vasselli May 24 '16 at 18:26
  • I also having the same issue. It would be very appreciated if someone will publish a solution here. thanks – Zohar81 Sep 20 '16 at 11:24

0 Answers0