I figured out some further details: when I get a file or folder URL from the picker I need to call startAccessingSecurityScopedResource on it first prior to converting it to bookmark. If I don't do that and try to convert that URL to bookmark I am seeing this error in the console: [ERROR] getattrlist(/7{34}3/D{7}s/2{8}2/N{2}1/0{8}7/1{6}3/2{69}0.png) = 1 however the call to make bookmark: url!.bookmarkData(options: [], includingResourceValuesForKeys: nil, relativeTo: nil) doesn't return an error. For a folder URL it's even less visible: no error from the call (same as for file URL) but also nothing in the console as a hint. Later on (perhaps on a different lunch) when I read a bookmark (file or folder) I don't need to call startAccessingSecurityScopedResource on it (not sure if that's intentional behaviour or not).
Topic:
App & System Services
SubTopic:
Core OS
Tags: