Internet Plug-Ins

From iPhone Development Wiki
Revision as of 18:35, 14 October 2009 by KennyTM~ (talk | contribs) (Created page with ''''Internet Plug-Ins''' is a directory in <tt>/System/Library/</tt> and <tt>/Library/</tt> that contains plug-ins (like <del>Flash</del> and <del>Java</del>) for WebKit. == Str…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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>

@protocol WebPlugIn



// 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:

The Info.plist should contain some keys starting with WebPlugin…. See [1] for detail.