Search code examples
macospluginsgoogle-chromenpapi

Mac OS X NPAPI plugin does not show up in Chrome's "about:plugins" list


I'm developing an NPAPI plugin for Mac and it works and registers properly in both Firefox and Safari, but not with Chrome.

The Info.plist for the plugin is adequate enough for Firefox and Safari to acknowledge that it exists in their own plugin listings. Chrome isn't finding it. Any ideas?

Info.plist from Xcode:

<?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>

Solution

  • In addition to checking the plist, Mac Chrome runs CFBundlePreflightExecutable to make sure the plugin is loadable, so perhaps that's the step that's failing. How did you build your plugin? If it's a 64-bit-only binary, Mac Chrome isn't currently capable of loading it, whereas on 10.6 Safari and Firefox are.