I am trying to make a sbsettings toggle that I can use with activator to toggle multiple things for using my phone in the car. If it were possible to assign multiple actions to a gesture or voice command I wouldnt need to do this but that isnt possible right now. Anyways, the toggle is suppose to turn on sbrotator, DisplayOut, and jump to page 3 of springboard (witch is set up with specific "in car" apps for easy access. Then when the toggle is switched again everything is turned off and jump back to home screen. Below is the code I have come up with. This is my first stab at coding something for iphone.

Code:
#import <UIKit/UIKit.h>

#include <unistd.h>
#include <stdlib.h>
#include <ctype.h>

BOOL isCapable()
{
	return YES;
}

BOOL isEnabled()
{
	NSDictionary *plistDict = [NSDictionary dictionaryWithContentsOfFile:@"/var/mobile/Library/Preferences/com.booleanmagic.displayout.plist"];
	NSDictionary *plistDict = [NSDictionary dictionaryWithContentsOfFile:@"/var/mobile/Library/Preferences/net.limneos.sbrotator4.plist"];
	BOOL Location1 = [[plistDict objectForKey:@"DOEnabled"] boolValue];
	BOOL Location2 = [[plistDict objectForKey:@"EnableRotation"] boolValue];

	return Location1,Location2;
}

void setState(BOOL Enable)
{
	NSMutableDictionary *plistDict = [NSMutableDictionary dictionaryWithContentsOfFile:@"/var/mobile/Library/Preferences/com.booleanmagic.displayout.plist"];
	NSMutableDictionary *plistDict = [NSMutableDictionary dictionaryWithContentsOfFile:@"/var/mobile/Library/Preferences/net.limneos.sbrotator4.plist"];
	if (Enable == YES) 
	{
		[plistDict setBool:YES forKey:@"DOEnabled"];
		[plistDict writeToFile:@"/var/mobile/Library/Preferences/com.booleanmagic.displayout.plist" atomically: YES];
		
		[plistDict setBool:YES forKey:@"EnableRotation"];
		[plistDict writeToFile:@"/var/mobile/Library/Preferences/net.limneos.sbrotator4.plist" atomically: YES];
		
		[self scrollToIconListAtIndex:2 animate:NO];
	}
	else if (Enable == NO) 
	{
		[plistDict setBool:NO forKey:@"DOEnabled"];
		[plistDict writeToFile:@"/var/mobile/Library/Preferences/com.booleanmagic.displayout.plist" atomically: YES];
		
		[plistDict setBool:NO forKey:@"EnableRotation"];
		[plistDict writeToFile:@"/var/mobile/Library/Preferences/net.limneos.sbrotator4.plist" atomically: YES];
		
		[self scrollToIconListAtIndex:0 animate:NO];
	}
	
}

float getDelayTime()
{
	return 2.0f;
}

I haven't attempted to compile it yet. Just wanted to see if I was on the right track and if it will even do what I want it to. Thanks in advance!