Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cocoa/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Cocoa 如何使finder同步扩展自动加载?_Cocoa_Findersync - Fatal编程技术网

Cocoa 如何使finder同步扩展自动加载?

Cocoa 如何使finder同步扩展自动加载?,cocoa,findersync,Cocoa,Findersync,我创建了一个cocoa应用程序项目,并添加了目标“Finder sync extension”。然后,“finderSync.appex”将被放入“../Contens/Plugins/”文件夹。但是当我启动应用程序时,扩展不是自动加载的,我应该手动加载吗?我怎样才能加载它 《苹果开发指南》中写道: For OS X to recognize and automatically load the Finder Sync extension, the extension target’s info

我创建了一个cocoa应用程序项目,并添加了目标“Finder sync extension”。然后,“finderSync.appex”将被放入“../Contens/Plugins/”文件夹。但是当我启动应用程序时,扩展不是自动加载的,我应该手动加载吗?我怎样才能加载它

《苹果开发指南》中写道:

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>
要让OS X识别并自动加载Finder Sync扩展,扩展目标的info.plist文件必须包含以下条目:
扩展
N扩展属性
NSExtensionPointIdentifier
com.apple.FinderSync
NSExtensionPrincipalClass
$(产品\模块\名称)。FinderSync

我已经设置为上面的,但它不起作用。

您需要向Finder注册扩展名:

pluginkit -a <path you your appex>
pluginkit-a
您可能还需要告诉Finder启用扩展:

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

您好,我也面临同样的问题。你能解决这个问题吗。添加$PRODUCT\u MODULE\u NAME时,应用程序崩溃。可以用这种方式手动完成,但我不确定是否应该这样做。看起来应该是小写的“I”:“pluginkit-e use-I”(可能你像我刚才一样被auto-correct黑客攻击)。@rsfinn谢谢你