App won't start on Monterey

I’ve got a strange problem with my app on one of my MacBooks.

At start I get an ioException because it can’t write preferences for the app in a specific folder. If I open package contents/MacOS/myapp and drag it into terminal it starts and can write preferences…?

Any suggestions, why? in system/security app is allowed to read/write folder permissions.


Which folder?

If you’re using anything other than SpecialFolder.ApplicationData.Child("") you are using the wrong location.

its a folder in the same folder the app is…
these are preferences like server-url and so on

on my other MacBook (also Monterey) I don’t have this problem…

these folder am I using for the “global” app preferences

You don’t always have access to the same folder the app lives in. It has to do with something called Gatekeeper and Translocation. There is lots of information floating around the forum talking about these topics. Here is a search link for those keywords to get you started.

You can remove the quarantine flag on your machine to regain access to the folder your app lives in, but you won’t be able to publicly distribute an app that looks for resources next to itself.

Xojo itself has this problem, but they don’t seem interested in addressing it.

For the record, that has been added for a future release: 58591 - Detect quarantine for Xojo app


Heck yeah that’s awesome news!

Must move the remaining preferences (server-url and so on) to that Specialfolder as well.

Thanks to all!
Moved all application related preferences to SpecialFolder.ApplicationData… works :grinning: