How to debug quick look preview extension?

I'm developing a quick look preview extension for spotlight index items, referencing the example app in https://developer.apple.com/videos/play/wwdc2017/231/

I could create searchable spotlight items, but the preview shows nothing when I select an item from the spotlight search list. Console.app shows no error messages. The view controller implementing QLPreviewingController does not seem to be used.

So, How can I debug what's wrong with the preview extension?


Here's one thing I could check:

"pluginkit -mAvvv -p com.apple.quicklook.preview" shows my extension as follows.


com.naver.Whale.SpotlightExtension(1.0)

Path = /Users/conanoc/Desktop/Whale.app/Contents/Plugins/spotlight_preview.appex

UUID = 96388BDF-F937-4DC0-9DDE-52640AE137DC

Timestamp = 2019-03-15 06:30:24 +0000

SDK = com.apple.quicklook.preview

Parent Bundle = /Users/conanoc/Desktop/Whale.app

Display Name = Whale Preview

Short Name = spotlight_preview

Parent Name = Whale

When you build and run in Xcode, it should give you the option to use the Quick Look Simulator

Any updates? I have similar issue. Extension works fine if I run it with Quick Look Simulator, but the system does't launch it when I search my indexed item via spotlight. Spotlight finds it but the preview is empty. I've already tried to move my app to /Applications folder but it didn't help.

Same here. Works in the Simulator, does not work in Spotlight (correctly finds what it's looking for, but no preview is shown). Oddly, it appears to work on 10.13, but not on 10.14.

If it helps anyone in the future, I've found that when I install my application on non-development machines (machines that don't have the project), the quick look preview extension is started and works properly. I'm using the core spotlight approach...

How do you use the Quick Look Simulator? When I run my Quick Look Preview Extension in Xcode, that app opens but it only shows a search field.

How to debug quick look preview extension?
 
 
Q