Skip to content

Dealing with Full Disk Access and Files & Folders Access #9

@demitri

Description

@demitri

I've been using these great classes in my app for a while. I'm finally getting around to updating my app for Mojave and Catalina, both of which introduced new security restrictions. This has broken a lot of my code in unexpected ways. There are cases where attempting to open a file through the open dialog will still fail unless FDA permission is given. This is turning my code into spaghetti.

The core of the problem is that there is no API to tell you if a file's access is blocked because of these restrictions, but can be given if the user turns on these permissions. See this thread from a year ago; I don't think anything has changed (certainly not for Mojave):

Reliable test for Full Disk Access?

Apple says not to assume a set of directories that fall under these permissions, but provides no way of testing whether FDA is on or not or which folders is applies to. I was thinking that AppSandboxFileAccess is the right place to put these tests and return an "educated guess" as to why a file cannot be read. It might even go as far as to put up a window showing the user how to turn on FDA and Files and Folders access.

Is there any interest in this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions