Mac OS X NPAPI插件未显示在Chrome的“about:plugins”列表中

时间:2011-06-28 21:47:43

标签: macos plugins google-chrome npapi

我正在为Mac开发一个NPAPI插件,它可以在Firefox和Safari中正常工作和注册,但不适用于Chrome。

该插件的Info.plist足以让Firefox和Safari承认它存在于自己的插件列表中。 Chrome没有找到它。有什么想法吗?

来自Xcode的Info.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleGetInfoString</key>
<string>XXXXXX</string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.${PRODUCT_NAME:XXXXXX}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>BRPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>WebPluginDescription</key>
<string>XXXXXXX</string>
<key>WebPluginMIMETypes</key>
<dict>
    <key>application/x-XXXXXX-plugin</key>
    <dict>
        <key>WebPluginExtensions</key>
            <array>
                <string></string>
            </array>
        <key>WebPluginTypeDescription</key>
        <string>XXXXXX</string>
    </dict>
</dict>
<key>WebPluginName</key>
<string>XXXXXXXXXX</string>
</dict>
</plist>

1 个答案:

答案 0 :(得分:7)

除了检查plist之外,Mac Chrome还运行CFBundlePreflightExecutable以确保插件是可加载的,所以也许这就是失败的步骤。你是如何构建插件的?如果它只是一个64位的二进制文件,Mac Chrome目前无法加载它,而在10.6 Safari和Firefox上则是。