I have an app that cannot access files/folders on Mac Sequoia. I went thru the whole ‘notarization’ thing with Apple so that it would run, but having done that the compiled app does nothing when I try any of the various file-open interfaces (menu, button). (No open file dialog.) All works fine when I’m running in debugger, and has worked fine for many, many years. Going through the System Settings → Privacy & Security → Files & Folders, I don’t see my app listed, nor do I see any way to add applications to the list. I know that various apps trigger a msgbox asking if you want to give them permission to access a folder/file, but I have not seen that. My search efforts have so far come up dry, so am hoping someone here knows the trick. Thanks!
AFAIK, an app you build and run on your own machine does not even need to be codesigned or notarised. Anyway. Now it seems you have a button which when pressed should bring up an open file dialog. Lets see the code that you have in the Pressed event handler for that button.
I’m not at my computer now, but you might look at how entitlements are set in AppWrapper.
Is the app Sandboxed too? If so, have you enabled the entitlements so the user can Read/Write selected files? (Also, if Notarized, then I guess you has enabled Hardened Runtime too, isn’t?
I used your blog post to do it, so yes. (macOS Apps: From Sandboxing to Notarization, The Basics – Xojo Programming Blog) … and I just figured out that it must have been something in the process that caused this issue, because freshly built copy (not notarized) does not have the problem.
Good to know. My bet is about the mentioned entitlement.
BTW since Xojo 2024r4, you can do all the process right away from the IDE
I scanned through entitlements a bit too quickly I guess. Did not occur to me that ordinary file access would be in there. I’m guessing I need to add network client as well since the app periodically checks for updates… So I am adding these lines to entitlement file and re-running the notarization process.
com.apple.security.files.user-selected.read-write
com.apple.security.network.client
Thanks for insight.
Also - how to do this from IDE?
Under the Signing building step for macOS Build Settings.