Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
while we're talking about sbsettings toggles, what does the 'location' toggle do?
it seems to be off by default and i've never switched it on yet my photos are geocached and google maps finds my location.
 
Hmmm my airplane mode toggle works as intended. Searching for a few seconds then no service.

That's not as intended. It's supposed to change to an orange airplane image, not search for service and then say no service.

The thing I really liked about the SBSettings airplane mode toggle was that it didn't shut WiFi off. If you use the settings app to go into airplane mode, you have to toggle WiFi back on each time.
 
on software 3.x SBSsettings phone toggle put the phone on aeroplane mode

now in all ios4 releases the phone toggle doesn't do that and breaks it needs an update.
 
services

while we're talking about sbsettings toggles, what does the 'location' toggle do?
it seems to be off by default and i've never switched it on yet my photos are geocached and google maps finds my location.

That turns off the location services, for gps mapping, etc. Big battery hog in general when left on sometimes.

As for the airplane mode, indeed that button is there as I noted above. I would add though, that is isn't the SAME as hitting the airplane mode switch in the apple settings, since it doesn't ALSO kill the WIFI radios. The airplane mode in the apple settings shuts off ALL radios when switched.

edit: sorry europa, you beat me to it.
 
That doesnt sound like airplane mode..

Lol, if someone doesn't know the difference between "Searching.../No Service" and an airplane mode icon/airplane mode I question if they really should be jailbreaking or using sbsettings or even owning an iPhone haha

I'm going to go bury my head in the sand and cry. Lol
 
Hmmm my airplane mode toggle works as intended. Searching for a few seconds then no service.

No, that's battery drain mode. :) If it was working correctly you should see an airplane icon replace your signal bars. For some reason the SBSettings toggle for airplane mode doesn't work with iOS4.

For now, it's best to go into Settings and switch it on that way.
 
Can some developer fix and compile this code...

Hi -

I tried to fix this code and compile it for Phone Toggle but I don't have necessary setup to compile the code to create dylib and also I am absolutely noob at developing for iPhone.


So here is the code. I take no credit. This is from Bigboss site. There is one FAQ on how to create SBSettings toggle. Sample source code was given for the Location toggle.

I just changed some things and I don't know how to change others (see my comment at the bottom). Some developer can fix it and compile the dylib. I have put my comments.

File name is main.m.

-----------------------------------------------------------------------------
#import <UIKit/UIKit.h>

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

// Determines if the device is capable of running on this platform. If your toggle is device specific like only for
// 3g you would check that here.
BOOL isCapable()
{
return YES;
}

// This runs when iPhone springboard resets. This is on boot or respring.
BOOL isEnabled()
{
NSDictionary *plistDict = [NSDictionary dictionaryWithContentsOfFile:mad:"/var/mobile/Library/Preferences/com.apple.BTServer.airplane.plist"];
BOOL Location = [[plistDict objectForKey:mad:"airplaneMode"] boolValue];//mytakeontech: please note we have to convert on/off to Boolean here. I don't know the syntax

return Location;
}

// This function is optional and should only be used if it is likely for the toggle to become out of sync
// with the state while the iPhone is running. It must be very fast or you will slow down the animated
// showing of the sbsettings window. Imagine 12 slow toggles trying to refresh tate on show.
BOOL getStateFast()
{
return isEnabled();
}

// Pass in state to set. YES for enable, NO to disable.
void setState(BOOL Enable)
{
NSMutableDictionary *plistDict = [NSMutableDictionary dictionaryWithContentsOfFile:mad:"/var/mobile/Library/Preferences/com.apple.BTServer.airplane.plist"];
if (Enable == YES)
{
[plistDict setValue:mad:"on" forKey:mad:"airplaneMode"];
[plistDict writeToFile:mad:"/var/mobile/Library/Preferences/com.apple.BTServer.airplane.plist" atomically: YES];
}
else if (Enable == NO)
{
[plistDict setValue:mad:"off" forKey:mad:"airplaneMode"];
[plistDict writeToFile:mad:"/var/mobile/Library/Preferences/com.apple.BTServer.airplane.plist" atomically: YES];
}
// notify_post("com.apple.locationd/Prefs"); //mytakeonTech: I am not sure whether this is needed for Airplanemode
}

// Amount of time spinner should spin in seconds after the toggle is selected.
float getDelayTime()
{
return 0.6f;
}

// Runs when the dylib is loaded. Only useful for debug. Function can be omitted.
__attribute__((constructor))
static void toggle_initializer()
{
NSLog(@"Initializing LServices Toggle\n");
}
------------------------------------------------------------------------------------

Note: Please note that this code is not correct as of now. Location Toggle in .plist stores the value 1 or 0 for on and off but Airplane mode toggle .plist stores value on and off. I am not expert in this programming so I am not sure how to convert on off strings to Boolean 1 and 0 so some dev please fix my code (method BOOL isEnabled())and then please compile this into dylib and I hope we are done! :)

Again, this is just my assumption and I may be wrong, but I think the Phone toggle is broken because the .plist file for Phone toggle used to have values 1 or 0 but now they are changed to on or off. Can someone with iPhone OS 3.1.2 confirm this?

I hope someone comes forward!
 
Hi -

I tried to fix this code and compile it for Phone Toggle but I don't have necessary setup to compile the code to create dylib and also I am absolutely noob at developing for iPhone.


So here is the code. I take no credit. This is from Bigboss site. There is one FAQ on how to create SBSettings toggle. Sample source code was given for the Location toggle.

I just changed some things and I don't know how to change others (see my comment at the bottom). Some developer can fix it and compile the dylib. I have put my comments.

File name is main.m.

-----------------------------------------------------------------------------
#import <UIKit/UIKit.h>

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

// Determines if the device is capable of running on this platform. If your toggle is device specific like only for
// 3g you would check that here.
BOOL isCapable()
{
return YES;
}

// This runs when iPhone springboard resets. This is on boot or respring.
BOOL isEnabled()
{
NSDictionary *plistDict = [NSDictionary dictionaryWithContentsOfFile:mad:"/var/mobile/Library/Preferences/com.apple.BTServer.airplane.plist"];
BOOL Location = [[plistDict objectForKey:mad:"airplaneMode"] boolValue];//mytakeontech: please note we have to convert on/off to Boolean here. I don't know the syntax

return Location;
}

// This function is optional and should only be used if it is likely for the toggle to become out of sync
// with the state while the iPhone is running. It must be very fast or you will slow down the animated
// showing of the sbsettings window. Imagine 12 slow toggles trying to refresh tate on show.
BOOL getStateFast()
{
return isEnabled();
}

// Pass in state to set. YES for enable, NO to disable.
void setState(BOOL Enable)
{
NSMutableDictionary *plistDict = [NSMutableDictionary dictionaryWithContentsOfFile:mad:"/var/mobile/Library/Preferences/com.apple.BTServer.airplane.plist"];
if (Enable == YES)
{
[plistDict setValue:mad:"on" forKey:mad:"airplaneMode"];
[plistDict writeToFile:mad:"/var/mobile/Library/Preferences/com.apple.BTServer.airplane.plist" atomically: YES];
}
else if (Enable == NO)
{
[plistDict setValue:mad:"off" forKey:mad:"airplaneMode"];
[plistDict writeToFile:mad:"/var/mobile/Library/Preferences/com.apple.BTServer.airplane.plist" atomically: YES];
}
// notify_post("com.apple.locationd/Prefs"); //mytakeonTech: I am not sure whether this is needed for Airplanemode
}

// Amount of time spinner should spin in seconds after the toggle is selected.
float getDelayTime()
{
return 0.6f;
}

// Runs when the dylib is loaded. Only useful for debug. Function can be omitted.
__attribute__((constructor))
static void toggle_initializer()
{
NSLog(@"Initializing LServices Toggle\n");
}
------------------------------------------------------------------------------------

Note: Please note that this code is not correct as of now. Location Toggle in .plist stores the value 1 or 0 for on and off but Airplane mode toggle .plist stores value on and off. I am not expert in this programming so I am not sure how to convert on off strings to Boolean 1 and 0 so some dev please fix my code (method BOOL isEnabled())and then please compile this into dylib and I hope we are done! :)

Again, this is just my assumption and I may be wrong, but I think the Phone toggle is broken because the .plist file for Phone toggle used to have values 1 or 0 but now they are changed to on or off. Can someone with iPhone OS 3.1.2 confirm this?

I hope someone comes forward!

Congrats on making my head spin. So you didn't create the code, you don't understand the code, and you say the code is not the correct code, yet you posted the code. To confuse?
 
Congrats on making my head spin. So you didn't create the code, you don't understand the code, and you say the code is not the correct code, yet you posted the code. To confuse?

It's not too confusing. Please read slowly what I mentioned. Even though I am not familiar with C++ or Objective C, I am a computer professional and I can definitely understand the Code. Only think I could not change is isEnabled method (see my comments). again I could fix that too by doing some google search but I am thinking the fix is too easy for someone who is familiar with the iPhone programming.

Once isEnabled fixed I "think" this should solve the airplane mode toggle issue.

Again, the given code only updates the airplane mode toggle value on/off in corresponding .plist file. I am not sure whether any other code needs to be added to take care of any background processes that are executed when you change the airplane mode toggle on/off from the settings.app.
 
It's not too confusing.

Once isEnabled fixed I "think" this should solve the airplane mode toggle issue.

It's not too confusing, yet you stated you don't even understand it and you said you're an iPhone programmer, hehe.

Just playing... but seriously, I hope someone fixes this, or comes with an alternate toggle installer that'll bring back airplane mode to sb settings.

When the flight attendant is walking down the aisle, it's a lot easier to discretely open sbsettings to turn on airplane mode before she goes Shanqwa on me about turning off my cell phone for take-off.
 
Bummer nobody has fixed this yet :-( ... it ruins SBSETTINGS for me to not have the one-click disable radio tab that used to be known as Airplane Mode :-(
 
Bummer nobody has fixed this yet :-( ... it ruins SBSETTINGS for me to not have the one-click disable radio tab that used to be known as Airplane Mode :-(

I think it's a big of an exaggeration to say it "ruins" SBSettings, but I agree that this needs to be addressed. I used to use that toggle a couple of times per week, and I imagine that lots of people would use it all the time if it did what it used to do.
 
...

Note: Please note that this code is not correct as of now. Location Toggle in .plist stores the value 1 or 0 for on and off but Airplane mode toggle .plist stores value on and off.

...

If the code is expecting 0 or 1, and the .plist stores values on or off, just tell it to return 0 if .plist value is off, or 1 if .plist value is on.

Maybe I oversimplified or am not getting it, I just skimmed through the code and your response.
 
If the code is expecting 0 or 1, and the .plist stores values on or off, just tell it to return 0 if .plist value is off, or 1 if .plist value is on.

Maybe I oversimplified or am not getting it, I just skimmed through the code and your response.

Can anybody who has setup to compile dylibs for JB iPhone fix this small issue and compile the dylib and see if it works?

I can't believe so many Devs on MR and no one taking any initiative. I wish I could do this but there are no clear directions on compiling dylibs for JB iPhone.

May be I will give a try once I get some time.
 
Anyone know what the data toggle does?

Iam using the leopard theme, but its low res can anyone recommend a nice retina display theme?
 
has anybody tried to email the sbsettings creator or the cydia guy, if there both the same

maybe they dont know about this bug
 
Yea, +1 .... I get "searching" for about 5 seconds then "no Service" on my 4.01 iPhone 4.

SBSettings does not now nor has it ever had an airplane mode toggle. Instead, it has separate Wi-Fi and Phone toggles. To get the equivalent of airplane mode, toggle off phone and Wi-Fi. I am not going to worry about the fact that the airplane symbol does not appear. The toggle is not an airplane mode toggle anyways, and the fact that the airplane mode symbol appeared in the past was just a side effect of the method used to disable phone.

As it stands, the toggle works correctly and as intended. It kills the phone when off and allows the phone to work when on.

-BigBoss
http://thebigboss.org
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.