Debugging Finder Actions extensions (macOS)

Hi,

I'm trying to debug Finder extensions (NSExtensionPointIdentifier com.apple.ui-services).

If I run the debug build of container app the extensions won't activate in the Finder and won't show in System Preferences. Instead they show accordingly when I copy the app on the Desktop for example. I assume this is because Xcode build folders are not considered by the PluginKit framework.

Then I used the command:

pluginkit -a /path/to/xcode/data/Plugin1.appex
pluginkit -e use -i com.company.Plugin1

This allows all plugins (I have 4) to show in Finder 'Quick Actions' menu when I run Plugin1.appex in debug mode.

Steps used:

  • Select Appex target
  • Run and select the container App when prompted
  • The Finder Actions menu gets populated
  • In Xcode Appex process is waiting
  • Attach to running container from the Debug menu

Expected result:

  • I should be able to break in the code when selecting the action in Finder

Actual result:

  • As soon as I attach to the container the Finder menu is no more populated with my extensions

I assume I misused the PluginKit command but I cannot find any documentation on this topic. Any help is welcomed.

Debugging Finder Actions extensions (macOS)
 
 
Q