m (I guess no one uses /Library/Internet Plug-Ins anyway...) |
m (Updated a dead link) |
||
Line 32: | Line 32: | ||
== References == | == References == | ||
* [ | * [https://developer.apple.com/legacy/library/documentation/InternetWeb/Conceptual/WebKit_PluginProgTopic/WebKit_PluginProgTopic.pdf Introduction to WebKit Plug-in Programming Topics] (on Mac OS X; should be similar on the iPhoneOS though). | ||
{{Navbox Library}} | {{Navbox Library}} | ||
[[Category:Directories in /System/Library]] | [[Category:Directories in /System/Library]] |
Revision as of 01:43, 27 July 2014
Internet Plug-Ins is a directory in /System/Library/ and /Library/ that contains plug-ins (like Flash and Java) for WebKit.
Structure of an Internet Plug-In
Internet plug-ins should have an extension of .webplugin. The principal class should be a subclass of UIView and adopts the WebPlugInViewFactory and WebPlugIn protocols:
@protocol WebPlugInViewFactory <NSObject>
-(UIView*)plugInViewWithArguments:(NSDictionary*)args;
@end
@protocol WebPlugIn
@optional
-(void)webPlugInInitialize;
-(void)webPlugInDestroy;
-(void)webPlugInStop;
-(void)webPlugInStart;
-(id)objectForWebScript;
-(void)webPlugInMainResourceDidFailWithError:(NSError*)error;
-(void)webPlugInMainResourceDidFinishLoading;
-(void)webPlugInMainResourceDidReceiveData:(NSData*)data;
-(void)webPlugInMainResourceDidReceiveResponse:(NSURLResponse*)response;
// UIKit extras
-(BOOL)webPlugInReceivesEventsDirectly; // inform UIKit that this plug-in should handle the events directly.
-(void)webPlugInLayout; // similar to UIView's -layoutSubview
-(void)webPlugInDidDraw; // similar to UIView's -drawRect:
@end
The Info.plist should contain some keys starting with WebPlugin…. See [1] for detail.
References
- Introduction to WebKit Plug-in Programming Topics (on Mac OS X; should be similar on the iPhoneOS though).
|