My app lets you create projects which can hold images, and a file watcher watches the folders for changes. By default the images are stored in the application support folder, but I'm adding the ability to choose an external folder to save them too.
The user chooses a folder with an NSOpenPanel, and the project loads the images in the folder. The folder location is then saved to a json file in the app's support folder.
This works great, until the app is quit. When it launches again it can't read the contents of the folder anymore due to app sandbox.
How do you retain the permission to read from a folder even after the app is quit? I've been searching for over a day, but can't find any current information.
Any help would be appreciated!
The user chooses a folder with an NSOpenPanel, and the project loads the images in the folder. The folder location is then saved to a json file in the app's support folder.
This works great, until the app is quit. When it launches again it can't read the contents of the folder anymore due to app sandbox.
How do you retain the permission to read from a folder even after the app is quit? I've been searching for over a day, but can't find any current information.
Any help would be appreciated!
Via a security-scoped bookmark. See Security-Scoped Bookmarks and Persistent Resource Access.How do you retain the permission to read from a folder even after the
app is quit?
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"