flutter-plugins
flutter-plugins copied to clipboard
[desktop_drop] macos DropDoneDetails support apple bookmark
[desktop_drop] macos DropDoneDetails support apple bookmark
Thanks for the contribution.
I am not familiar with macOS api and I don't know what is the bookmark actually.
Can you add some example usage to the plugin example project so I can see it really worked?
in macos, the file path from a file picker can't be used next time, because the path is not permit. usually use bookmark to call startAccessingSecurityScopedResource to get permit like this, so It is necessary to obtain bookmarks at the same time from desktop_drop
var isStale: Bool = false
let url = try! URL(resolvingBookmarkData: bookmark, bookmarkDataIsStale: &isStale)
let suc = url.startAccessingSecurityScopedResource()