The application search for the occurences of a string into files and folders. Everything work fine until I enable sanbox. Then opendir(path_to_folder) report "Operation not permitted". By example dp = opendir("/Users/alain/Desktop"); set dp to NULL for my own Desktop. The application need only read access. How can I get this access ?
Sandboxed application and opendir()
With NSOpenPanel opendir() work correctly but the user don't want to select files and folders each time the application is launched. So I save the files and folders URLs for the next time. But then opendir(the_saved_URL) fail. What is the way to make opendir(the_saved_URL) work correctly ?
What ssmith_c and also…
You need to understand the different types of file system permission checks applied by macOS. It sounds like your app is sandboxed but, even if you disable App Sandbox, the Desktop folder is protected by MAC. See On File System Permissions for more about this.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"