When implementing a QLPreviewingController
, we only get the Spotlight uniqueIdentifier
but not the actual CSSearchableItem
.
I thought I could use CSSearchQuery
with a query like this
uniqueIdentifier == "\(identifier)"
to fetch the CSSearchableItem
of the selected item from Spotlight. However, I always receive an error:
Error Domain=NSCocoaErrorDomain Code=4099 "Couldn’t communicate with a helper application."
Is it not possible to call Spotlight from a QuickLook Preview extension? Is there another way to retrieve the CSSearchableItem
for the item to be previewed?