如何在Cocoa - Objective C中的系统首选项中启用FinderSync扩展 [英] How to enable FinderSync Extension in the System Preference in Cocoa - Objective C

查看:765
本文介绍了如何在Cocoa - Objective C中的系统首选项中启用FinderSync扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的Cocoa应用程序中集成FinderSync扩展,以显示文件和文件夹中的徽章。看下面的两个场景:

I am integrating FinderSync Extension in my Cocoa Application to show badges in files and folders. Look at the below two scenario:

1)当我使用FinderSync扩展(如DemoFinderSync)运行应用程序时,看看下面的图片中的蓝色弹出框,添加到具有复选标记的系统偏好中,并调用主类FinderSync.m。

1) When i run application using FinderSync Extension (like DemoFinderSync) look at the blue popup in the below image, in that case Extension is added in the System Preference with Check mark and called that principal class "FinderSync.m" as well.

2)当我使用我的应用程序(如DemoApp)运行应用程序时,下面的图像,在这种情况下,扩展被添加到系统偏好,但没有复选标记,并且主类FinderSync.m不调用,并且FinderSync扩展在这种情况下不工作。

2) When i run application using my Application Scheme (like DemoApp) look at the blue popup in the below image, in that case Extension is added in the System Preference but without check mark and that principal class "FinderSync.m" do not call and FinderSync Extension does not work in this case.

任何人都有一个想法如何使用第二个方案在系统偏好中启用Finder扩展。

So anybody have an idea how to enable Finder Extension in the System Preference using second scenario.

任何帮助是赞赏.. !!

Any help is appreciated..!!

推荐答案

我得到了解决方案:

b

system("pluginkit -e use -i YourAppBundleID")

禁用扩展程序代码(软件包ID)

Code to Disable Extension (bundle ID)

system("pluginkit -e ignore -i YourAppBundleID")

之前:

system("pluginkit -e use -i AppBundleID.FinderSync")

所以只要删除.FinderSync它的工作。

so just remove ".FinderSync" its working.

这篇关于如何在Cocoa - Objective C中的系统首选项中启用FinderSync扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆