0
votes

I am very new to Plugin development. I have an existing NPAPI plugin that works fine on Firefox. I want to reuse it and load it in Safari as well. To get started I downloaded the sample plugin from http://mxr.mozilla.org/mozilla2.0/source/modules/plugin/sdk/samples/basic/mac/. Built it in XCode and added the plugin under /Library/Internet Plugins/. I see that browser notifies asking for permission to access the plugin but I don't see it actually getting loaded. I am doing the following.

var npPlugin = document.createElement("embed");
(npPlugin).type = "application/x-myPlugin";
(npPlugin).data = "data:application/x-myPlugin,";
npPlugin.setAttribute("style", "width:0;height:0");
window.document.body.appendChild(npPlugin);    

Couldn't find a good way to debug it, so tried the raw way of creating a file and writing logs to it. I added this to both NP_GetEntryPoints & NP_Initialize with a hope that one of these functions will be invoked at the time of loading and will log for me. I didn't see any signs of my plugin getting loaded. Any ideas on how to make it to load or how to actually debug it?

1
Is your plugin compiled 32 bit, 64 bit, or both?taxilian
It is both. It actually worked yesterday. I had to comment out some code in the basic plugin and keep it barebones NPAPI required methods. Wanted to close this question but couldn't figure out a way.GK1
don't just close the question, write up an answer with details on what you did for future referencetaxilian

1 Answers

-1
votes

I commented out any code that was other than the NPAPI required methods. It helped me get around this problem.