【问题标题】:how to make a finder sync extension load automatically?如何使查找器同步扩展自动加载?
【发布时间】:2018-02-23 18:45:53
【问题描述】:

我创建了一个可可应用程序项目,并添加了目标“Finder 同步扩展”。然后“finderSync.appex”将被放入“.../Contens/Plugins/”文件夹。但是当我启动应用程序时,扩展程序没有自动加载,我应该手动加载吗?怎么加载?

来自 Apple 开发指南,它说:

For OS X to recognize and automatically load the Finder Sync extension, the extension target’s info.plist file must contain the following entries:

<key>NSExtension</key>
<dict>
    <key>NSExtensionAttributes</key>
    <dict/>
    <key>NSExtensionPointIdentifier</key>
    <string>com.apple.FinderSync</string>
    <key>NSExtensionPrincipalClass</key>
    <string>$(PRODUCT_MODULE_NAME).FinderSync</string>
</dict>

上面已经设置好了,但是还是不行。

【问题讨论】:

  • 嗨,我也面临同样的问题。你能解决这个问题吗。添加 $PRODUCT_MODULE_NAME 后,应用程序崩溃。手动可以以这种方式完成,但我不确定这是否应该这样做。 stackoverflow.com/questions/31176942/…

标签: cocoa findersync


【解决方案1】:

您需要在 Finder 中注册您的扩展程序:

pluginkit -a <path you your appex>

您可能还需要告诉 Finder 启用您的扩展程序:

pluginkit -e use -i <ID of you appex>

【讨论】:

  • 看起来应该是小写的“I”:“pluginkit -e use -i ”(可能你被自动更正攻击了,就像我刚才一样)。
  • @rsfinn 谢谢
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2018-05-06
  • 1970-01-01
  • 1970-01-01
  • 2017-01-20
  • 2023-03-20
  • 1970-01-01
  • 2010-10-03
相关资源
最近更新 更多