mNo edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
SBApplication* app = [[SBApplicationController sharedInstance] applicationWithDisplayIdentifier:@"com.yourcompany.appname"]; | SBApplication* app = [[SBApplicationController sharedInstance] applicationWithDisplayIdentifier:@"com.yourcompany.appname"]; | ||
</source> | </source> | ||
== Get all active applications == | |||
{{function signature | |||
|signature=-(NSArray*)_accessibilityRunningApplications; | |||
|firmware=3.0 – | |||
}} | |||
Getting active applications traditionally need to be done via the static function at <tt>0xeadc</tt>, or evaluate through the result of {{ObjcCall|SBApplicationController|allApplications}} and check if the <tt>pid</tt> is valid. Fortunately, starting from 3.0, the SpringBoard class provides a method -_accessibilityRunningApplications which directly calls <tt>0xeadc</tt>. Therefore, you can get the array of active applications from this. | |||
== Launching an SBApplication == | == Launching an SBApplication == |
Revision as of 07:09, 12 December 2009
SBApplication is a class representing the application screen on the SpringBoard. SBApplication is a subclass of SBDisplay. See SBDisplay for more info.
Retrieving an instance of SBApplication
To retrieve a known instance, you must go through SBApplicationController. For example, if the display ID of the application is known, you can use:
SBApplication* app = [[SBApplicationController sharedInstance] applicationWithDisplayIdentifier:@"com.yourcompany.appname"];
Get all active applications
Signature | -(NSArray*)_accessibilityRunningApplications; |
---|---|
Available in | 3.0 – |
Getting active applications traditionally need to be done via the static function at 0xeadc, or evaluate through the result of -[SBApplicationController allApplications] and check if the pid is valid. Fortunately, starting from 3.0, the SpringBoard class provides a method -_accessibilityRunningApplications which directly calls 0xeadc. Therefore, you can get the array of active applications from this.
Launching an SBApplication
To launch an SBApplication you can use SBUIController:
[[SBUIController sharedInstance] activateApplicationAnimated:app];
Note that this method will not respect parental control. You can look up the list of restricted apps using -[SpringBoard parentalControlsDisabledApplications], however.
Application Info.plist
SpringBoard will recognize the following Info.plist keys:
- UISystemProvisioning
- SBDemoRole[1]
- SBIsRevealable[1][2]
- SBUsesNetwork[3]
- UIJetsamPriority
- SBIconClass
- SBSpotlightIcons
- UIRoles
- SBMachServices
- Other UIKit keys described in http://developer.apple.com/IPhone/library/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html
References