1

我创建了一个可可应用程序项目,并添加了目标“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>

我已经设置如上,但它不起作用。

4

1 回答 1

1

您需要使用 Finder 注册您的扩展程序:

pluginkit -a <path you your appex>

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

pluginkit -e use -i <ID of you appex>
于 2017-11-24T20:48:00.510 回答