AppWrapper3 and Apple Installer Package

This is for @Sam Rowlands, but I thought that others might benefit from the answer.

When wrapping an app that is currently loaded within /Applications, specifying the Applications folder as the install destination, and selecting Apple Installer Package for the wrap type, the installer is placing the installed app into the
“~/Library/Mobile Documents/com~apple~CloudDocs/Desktop/”
folder instead of /Applications.

Is there a flag I possibly missed? The installation targets have been 10.13 and 10.14.

BTW - I’ve removed the /private/var/db/receipts entries for the package with the same result…

I found this oddity in the installer log:

Mar 6 11:20:18 osxdev1 installd[1556]: PackageKit: Applications/ArGest IngestPRO.app relocated to Users/tjones/Library/Mobile Documents/com~apple~CloudDocs/Desktop/ArGest IngestPRO 1.1.0.app

Discovered the issue -

An earlier version that was NOT installed with an installer package resulted in the sandboxing of THAT copy. Moving forward, because Finder/macOS knew the location of THAT file, it continued to put the new version into that location. Deleting that file and THEN installing placed the app into /Application as it should.

Seen this behavior a few times
The really stupid thing is that if the current location of ‘previous version’ is the Trash, it will install the new one there too…

I’d seen that before, but it took this to remind me of how ridiculous it could get…

That’s what Apple’s Package Tools do by default - probably because they think it’s what fits best for their users.

There is your clue…

Yup: Have a look at pkgbuild and/or search for: BundleIsRelocatable (set this to false) :)[quote=427244:@Tim Jones]When wrapping an app [/quote]
Ah… that’s if you’re creating the package yourself.
If that’s some AppWrapper functionality you’re using - then I don’t know how to set “BundleIsRelocatable=false” with that…
But I remember some “PackageMaker” (has that been part of Xcode Tools?) that I’ve used once. And it had a checkbox to set this Relocatable behavior.

You don’t know how many people this bamboozles; Apple’s default is to replace an existing copy first. However unless you know that, you have no idea what’s going.

here’s a “Installer Tester” option in App Wrapper which helps you to a) find all existing copies and b) It actually tells you where the Apple installer installed too, something that Apple doesn’t think is important.

On the flip side, using an Apple installer for updates is great as it replaces the existing version whereever it is (including as Jeff pointed out, even if it’s in the Trash).