Problem downloading a Mac Xojo App from the web

Since changing from Xojo 2015r3.1, if I download a zip file of my application folder (my application plus other files) the application does not run properly because it has a different current folder than what you would expect, so it cannot find files that are on the same folder as the application.

If I drag the Xojo app (.app) file from that folder to the Desktop and back to the folder again, it works properly. I have tried this on both Xojo 2017r1.1 and 2017r2.1 both have this issue. A simple project that displays the current folder (GetFolderItem("")) will demonstrate the problem.

Certainly this is being used by many people to download a Mac application off their own website (rather than the Mac Store). So how does my process differ from others, and what has changed since 2015r3.1?

Translocation has been added to the Operating System.

To put it simply: The OS does not allow downloaded Apps to be launched from their download location. It needs to be moved to another location to be able to run from this new location. Else, it will be “translocated”.

It’s actually more complex, but this was the essence i’ve learned from reading Post in this Forum, regarding this issue/fact.

I think this was the Thread i’ve learned the most from, about this issue.

You can try to package everything in a DMG and make sure the user is aware that the App needs to be copied to another location and not be started from within the DMG.

There are other solutions like signing, installers, … but just putting it in a DMG with a Likt to the App Folder and a short note that the App needs to be Dragged into the App Folder before use, sounds like the simplest.

After wading through the long post, I understand the situation really well, but am still at a loss of how to address a solution.

It works to drag just the app (.app) file somewhere, but I have companion files I would like to go with the Mac App, so I have put a folder in DMG. Moving the folder out of the DMG and to the Desktop or Application folder does not correct the issue. Only until I pick the .app and drag it somewhere and back does it work.

Been through this many times.
If you want to bundle extra stuff, you either need to create a full-on installer, or (and everyone will recommend this), add the files you need as part of the app bundle

For example, I zip up my entroe ‘support files’ folder, and drag the zip into the Xojo project.

It gets built into the app.
On startup, if the support folder doesnt exist, the app creates it and unpacks all the support files in it.
Then I ship in a DMG and the user only has one file to drag to Applications.

I just did a bit of testing to try to replicate your situation.

It appears that if you code sign the DMG that contains the folder with your application and support files, then copying that folder out of the DMG will remove the quarantine from the .app file that is contained inside.

This is how the Xojo distribution works. They sign the DMG as well as the application itself.

I have it working now. Using App Wrapper 3 to sign the DMG and using DMG Canvas to drag the folder into and a shortcut to the Application folder to drag the folder to when DMG is executed, yields a straightforward user experience for solving the problem. Thanks Jared.