Difference between revisions of "SpringBoardPlugins"

From iPhone Development Wiki
Jump to: navigation, search
m (Created page with 'As named, SpringBoardPlugins contains plugins for {{applink|SpringBoard}}. The exact location for this directory is determined by the method <tt>-[</tt><tt>SpringBoard sp…')
 
m (Fixed broken link and rearranged text)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
As named, [[SpringBoardPlugins]] contains plugins for {{applink|SpringBoard}}. The exact location for this directory is determined by the method <tt>-[</tt><tt>[[SpringBoard]] springBoardPluginsDirectory]</tt>.
+
[[SpringBoardPlugins]] contains plugins for {{applink|SpringBoard}}. The exact location for this directory is determined by the method <tt>-[</tt><tt>[[SpringBoard]] springBoardPluginsDirectory]</tt>  
  
Currently, SpringBoardPlugins serve 2 purposes:  
+
SpringBoardPlugins serve many purposes, including these:  
# Supports “ZoomTouch”, the accessibility feature which magnifies the screen by 2 to 5 times<ref>Apple - Accessibility - iPhone - Vision http://www.apple.com/accessibility/iphone/vision.html</ref>.
+
# Supporting “ZoomTouch”, the accessibility feature that magnifies the screen by two to five times.<ref>Apple - Accessibility - iPhone - Vision http://www.apple.com/accessibility/ios/#vision</ref>
# Supports lock screen bundles, like the Nike+iPod screen. This is the basis of [[Cydget]].
+
# Supporting lock screen bundles, such as the Nike and iPod lockscreens. This is the basis of [[Cydget]].
  
Lock screen bundles are supported starting from 2.1, and ZoomTouch starting from 3.0.  
+
Lock screen bundles have been supported starting in 2.1, and ZoomTouch starting in 3.0.
 +
 
 +
See [http://theiphonewiki.com/wiki//System/Library/SpringBoardPlugins TheiPhoneWiki] for a list of plugins.
  
 
== Structure of ZoomTouch bundle ==
 
== Structure of ZoomTouch bundle ==
The ZoomTouch bundle must be named as <tt>ZoomTouch.bundle</tt>. The principle class should implement the +disableZoom and +enableZoom methods.
+
The ZoomTouch bundle must be named <tt>ZoomTouch.bundle</tt>. The principal class should implement the +disableZoom and +enableZoom methods.
 +
 
 +
=== Enabling ZoomTouch ===
 +
ZoomTouch is the only non-lockscreen plugin. As such, it is hard-coded into SpringBoard.
 +
<source lang="objc">
 +
...
 +
// Inside SpringBoard
 +
[(SpringBoard *)[UIApplication sharedApplication] setZoomTouchEnabled:YES];
 +
...
 +
</source>
  
 
== Structure of lock screen bundles ==
 
== Structure of lock screen bundles ==

Latest revision as of 16:02, 4 August 2014

SpringBoardPlugins contains plugins for SpringBoard. The exact location for this directory is determined by the method -[SpringBoard springBoardPluginsDirectory]

SpringBoardPlugins serve many purposes, including these:

  1. Supporting “ZoomTouch”, the accessibility feature that magnifies the screen by two to five times.[1]
  2. Supporting lock screen bundles, such as the Nike and iPod lockscreens. This is the basis of Cydget.

Lock screen bundles have been supported starting in 2.1, and ZoomTouch starting in 3.0.

See TheiPhoneWiki for a list of plugins.

Structure of ZoomTouch bundle

The ZoomTouch bundle must be named ZoomTouch.bundle. The principal class should implement the +disableZoom and +enableZoom methods.

Enabling ZoomTouch

ZoomTouch is the only non-lockscreen plugin. As such, it is hard-coded into SpringBoard.

...
// Inside SpringBoard
[(SpringBoard *)[UIApplication sharedApplication] setZoomTouchEnabled:YES];
...

Structure of lock screen bundles

A lock screen bundle must have an extension of .bundle. The principle class should implement the +rootViewController method, and returns an SBAwayViewPluginController.

Enabling lock screen bundles

Lock screen bundles can be toggled using SpringBoardServices's SBEnableLockScreenBundle() function outside of SpringBoard, and SBAwayController's -enableLockScreenBundleWithName: and -disableLockScreenBundleWithName: within SpringBoard. When called outside of SpringBoard, the binary must have the com.apple.springboard.activateawayviewplugins entitlement.

References

  1. Apple - Accessibility - iPhone - Vision http://www.apple.com/accessibility/ios/#vision