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
FBSSystemService: Difference between revisions - iPhone Development Wiki

FBSSystemService: Difference between revisions

From iPhone Development Wiki
No edit summary
m (Formatting.)
Line 1: Line 1:
[[FBSSystemService]] is a private class introduced in iOS 8 for supplying various system actions.
[[FBSSystemService]] is a private class introduced in iOS 8 for supplying various system actions.


== Methods ==
= Methods =


{{function signature
{{function signature
Line 17: Line 17:
This method can send appropriate system-related actions. For example, [[SBSRestartRenderServerAction]] action.
This method can send appropriate system-related actions. For example, [[SBSRestartRenderServerAction]] action.


== Relaunch SpringBoard with relaunch URL ==
= Relaunch SpringBoard with relaunch URL =


<source lang=objc>
<source lang=objc>
 
// Also link FrontBoardServices and SpringBoardServices to your project
// Also link FrontBoardServices and SpringBoardServices to your project
NSURL *relaunchURL = [NSURL URLWithString:@"prefs:root=DISPLAY&path=MAGNIFY"];
NSURL *relaunchURL = [NSURL URLWithString:@"prefs:root=DISPLAY&path=MAGNIFY"];
SBSRestartRenderServerAction *restartAction = [SBSRestartRenderServerAction restartActionWithTargetRelaunchURL:relaunchURL];
SBSRestartRenderServerAction *restartAction = [SBSRestartRenderServerAction restartActionWithTargetRelaunchURL:relaunchURL];
[[FBSSystemService sharedService] sendActions:[NSSet setWithObject:restartAction] withResult:nil];
[[FBSSystemService sharedService] sendActions:[NSSet setWithObject:restartAction] withResult:nil];
 
</source>
</source>


{{occlass|library=FrontBoardServices.framework|navbox=1}}
{{occlass|library=FrontBoardServices.framework|navbox=1}}

Revision as of 04:29, 26 December 2015

FBSSystemService is a private class introduced in iOS 8 for supplying various system actions.

Methods

Signature +(FBSSystemService *)sharedService;
Available in 8.0 —

Create FBSSystemService singleton.

Signature -(void)sendActions:(NSSet *)actions withResult:(id *)result;
Available in 8.0 —

This method can send appropriate system-related actions. For example, SBSRestartRenderServerAction action.

Relaunch SpringBoard with relaunch URL

	// Also link FrontBoardServices and SpringBoardServices to your project
	NSURL *relaunchURL = [NSURL URLWithString:@"prefs:root=DISPLAY&path=MAGNIFY"];
	SBSRestartRenderServerAction *restartAction = [SBSRestartRenderServerAction restartActionWithTargetRelaunchURL:relaunchURL];
	[[FBSSystemService sharedService] sendActions:[NSSet setWithObject:restartAction] withResult:nil];