How do i enable the service menu programmatically with out the user log out then enable it in the keyboard preferences?

后端 未结 1 1596
清歌不尽
清歌不尽 2021-01-07 07:12

As the title tells,please help...

相关标签:
1条回答
  • 2021-01-07 07:48

    You need to include the NSRequiredContext key in each of your services' dictionaries.

    The documentation doesn't mention this, but it is required since Mac OS X 10.6; as you've seen, your service will be disabled by default if you don't have it.

    You should also call the NSUpdateDynamicServices function on launch, to refresh the user's Services menu without them having to log out and back in.

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