How to define the WebPluginMIMETypesFilename in the plist of a safari webplugin project?

て烟熏妆下的殇ゞ 提交于 2020-01-15 10:08:54

问题


I want to know the defination of WebPluginMIMETypesFilename, if my project is SafariPlugins. target extension is webplugin, My WebPluginMIMETypesFilename is com.SafariPlugIns.webplugin.plist? and what is the webPluginMIMETYpes, I just know when safari lunch , it will test the webplugin if have the webPluginMIMETYpes or not. and then load the plugin , but it is what to do ? and it's definition?

and another question is : if I define the the Principal class of plist my plugin class name:SafariPlugIn, and if the App will begin in that class firstly. and in the plugin class the method:

  • (NSView *)plugInViewWithArguments:(NSDictionary *)arguments

will begin firstly?


回答1:


I want to know the defination of WebPluginMIMETypesFilename …

It's the name of the file in which you've declared the MIME types your plug-in can handle. You'll add that file as a resource of the plug-in.

it is what to do ? and it's definition?

According to Chromium's WebKit source, the contents of the file should be a dictionary with the key WebPluginMIMETypes, whose value should be another dictionary. Presumably, that inner dictionary should be of the same format that you might put directly into your Info.plist file, as exemplified by ClickToFlash's dictionary.

and another question …

Should go in another question.



来源:https://stackoverflow.com/questions/1476249/how-to-define-the-webpluginmimetypesfilename-in-the-plist-of-a-safari-webplugin

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!