Unable to access related file in QuickLook Thumbnail Extension and QuickLook Preview Extension

Hi, I am developing QuickLook Thumbnail Extension and QuickLook Preview Extension which work with embroidery files.

To prepare the view, I need to access stitches from the "stitch" file (supplied to my extension by system) and also to read the "colors" from related file (i.e. the file with different extension, but the same filename as "stitch" file). The embrodery is located stored in 2 files: squirrel.dst (stitchs) and squirrel.edr (colors).

Is it even possible to extend sandbox in extensions for this task?

I have tried to ask user to select folder in main.app (NSOpenPanel), create security-scoped Bookmark in main.app and access it from extension. However, this is not working - in the extension it is not possible to resolve the bookmark created in main.app.

I have also tried to use mechanism for accessing related files as shown at https://developer.apple.com/documentation/security/app_sandbox/protecting_user_data_with_app_sandbox, using NSFilePresenter/NSFileCoordinator. It works in main.app, but doesn't work in QuickLook Thumbnail Extension and QuickLook Preview Extension.

Is there any mechanism on Mac which would allow me to access more than the "supplied" file URL in QuickLook Thumbnail Extension and QuickLook Preview Extension?

Ladislav

Unable to access related file in QuickLook Thumbnail Extension and QuickLook Preview Extension
 
 
Q