Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/extensions/Variables/includes/ExtVariables.php on line 198
Internet Plug-Ins - iPhone Development Wiki

Internet Plug-Ins

From iPhone Development Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Internet Plug-Ins is a directory in /System/Library/ and /Library/ that contains plug-ins for WebKit. As of iOS 6 and 7, the only default plugin there is QuickTime.

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