Unable to add item in Finder's contextual menu using services in Cocoa

前端 未结 1 765
情话喂你
情话喂你 2021-02-03 11:18


I would like to add an item in my Finder\'s contextual menu whenever I right-click on files or folders, and this menu being linked to a method of my Cocoa app.
I am fol

相关标签:
1条回答
  • 2021-02-03 11:39

    Found the issues:
    1. I really had to store my application at least once into the Applications folder (which is not done by default when you compile with Xcode)
    2. Should have added NSUpdateDynamicServices(); after the [NSApp setServicesProvider:self]; command.
    3. Wait roughly 10 secs after having started the app to get Finder's Services menu populated.

    0 讨论(0)
提交回复
热议问题