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?