I have two macOS applications: Application A, named My App.app with the bundle ID com.comp.myapp, and Application B, named My App.app with the bundle ID com.comp.myapp2. Both applications have the same name. Application A is installed at /Applications/My App.app. When I run the installer for Application B, it gets installed in a folder at /Applications/My App.localized/My App.app. Even if I remove Application A using the preinstall script of Application B's installer, the result remains the same.
Does the installer determine the installation path with the new folder before the preinstall script executes?
How can it be addressed so the new folder will not be created?
Notes:
We have a composite package that contains multiple components. Instead of just running pkgbuild, we use our own components.plist rather than a synthesized one. The components.plist is attached.
The PackageInfo for Application B is also attached.
components.plist
PackageInfo
packageInfo.xml
components.plist