1

We are packaging our app for drag and drop installation DMG as following:

Application Name/Application.app
Application Name/Readme
Application Name/Examples/...
Application Name/Documentation/...

And user is supposed to d&d Application Name Folder to /Applications/. Everything is code signed including DMG.

From most information I read this should be enough to prevent app translocation happening, but for some reason it isn't for some of our Sierra users?

The solution for them would be beside d&d folder to /Applications is to do another drag & drop (move) Application.app somewhere and back to /Applications/Application Name/ or move only Application Name/Application.app overwriting /Applications/Application Name/Application.app.

Now the question is why do only some users have this issue, and shouldn't code signing dmg prevent app translocation from happening?

I verified they have selected Allow apps downloaded from Mac App Store and identified developers.

IvanG
  • 31
  • 2
  • 6

1 Answers1

0

I had this same problem on my side and had to go get some help via DTS, so I thought I'd repay the favor by replying here:

To avoid translocation, it turns out that not only is the disk image DMG supposed to be signed, but the file format for the image needs to be very specific: UDRO.

You can see more information about UDRO when you look at the man page for the hdiutil command line tool.

Michael Dautermann
  • 88,797
  • 17
  • 166
  • 215
  • The format I'm using is `UDZO` I tried setting `UDRO` and the only thing changed was the file size increased, but it didn't help with GPRP, the app was still translocated after moving folder containing it. – IvanG Jun 05 '17 at 19:58
  • So if you `cd` into the disk image in the Terminal and type in "`hdiutil info`", do you see `UDRO` as the format? – Michael Dautermann Jun 05 '17 at 20:00
  • I have shell script that first creates `-fs HFS+ -format UDRW` image mounts it and prepares everything in it, and than I do `hdiutil convert temp.dmg -format UDZO -o final.dmg` after that I codesing dmg I tried using `-format UDRO` instead and it didn't help. hdiutil imageinfo gives me `Format: UDRO` – IvanG Jun 06 '17 at 10:06