I have an app that needs access to the directory containing the file opened by the user. The workflow for creating a new app document is:
- user selects a .plist file with info related to the new document
- app calculates path of another folder with data files next to that .plist file
- app calculates path of new app document
- user reviews info, clicks "Continue" button
- app reads .plist, creates new app document, reads data files
On Catalina, the .plist can be read, because it was selected via NSOpenPanel. The additional folder can't be accessed, and the new app document can't be created, presumably because they weren't selected via NSOpenPanel. The file exists in a ~/Development/ subdirectory and does not trigger a permissions request to access the directory. The same problem occurs if the directory is accessed via network share (end users will always use a network share).
Is there any way to enable this functionality on Catalina without requiring users to enable full disk access? This is a business workflow app so enabling full disk access isn't a big problem, but if there's a way to get permission to access other items in the parent directory of the chosen file I'd rather just do that.
On a side note, a different app (not a Cocoa app) that creates that .plist has been granted access to the Documents folder, and is able to create that .plist file which is not in the ~/Documents folder without any permissions promps. That app does require the user to select a directory a couple levels above where the .plist is created. Does selecting a directory via NSOpenPanel grant implicit permissions to all subdirectories?
edit: the app is not a sandboxed app.
Jim Crate