One of the functions in an app I made is to add bookmarks to directories that a plugin can access (read-only).
For the most part it works fine, however, I have noticed that granting access to a directory containing a Package.swift
will cause the startAccessingSecurityScopedResource
method to fail.
I am not currently using the .withSecurityScope
option when retrieving the bookmark data:
let data = try url.bookmarkData(options: [], includingResourceValuesForKeys: nil, relativeTo: nil)
however it is worth noting that when I do include the .withSecurityScope
option this method also fails with an error 256: Failed to open/cannot open
I have read through the documentation and I can't see anything specific around the contents of a directory. Was wondering if anyone else has hit this one or has any links to specific documentation around the issue/directory content limitations?