I'm working on adding a finder sync extension to an app. The app is not sandboxed.
In essence, the app is operating on files located in folders that the user chooses, the app stores the status information in an extended attribute for each file.
The extension needs to monitor these folders and and assign a badge according to the state indicated in the extended attribute.
Everything is working fine, I can get the app and extension to communicate which folders to watch, I can manipulate the files with the app, setting the extended attributes and the extension is getting requestBadgeIdentifierForURL called.
However, attempting to read the the extended attribute using getxattr() is blocked by the sandbox.
I tried creating an app group and to store the folder urls as security scoped bookmarks in the group but this fails when trying to resolve the bookmark.
In retrospect this makes sense since the security scoped bookmark is supposed to be used for accessing the same url by the same app in the same sandbox which is not the case when dealing with an un-sandboxed app and a sandboxed Finder Find Extension.
I read somewhere (here: https://developer.apple.com/forums/thread/66259?page=2) from someone, quoting DTS on a similar issue that he can either communicate to the main app process to get the information or use document scoped security scoped bookmarks but I'm having trouble finding information about document scoped bookmarks and I'm not sure if it makes sense either.
Thanks in advance
Eyal