Jump to content

17 posts in this topic

Recommended Posts

Posted
 

#define PLIST_PATH @"/var/mobile/Library/Preferences/com.asd.prefs.plist"

 

inline bool GetPrefBool(NSString *key)

{

return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];

}

 

%hook SBReachabilitySettings

 

-(void)setReachabilityDefaultKeepAlive:(int)argument {

argument = 1 ;

 

}

%end

 

 

 

 

is this correct? How do i add a flipswitch to turn it on/off and how can i make a field for the user to enter the argument integer 
Posted

yeah i did, wanted to see if my code was right before proceeding :)

It's not, there's no switch set for it..

Posted (edited)

if i were to run the code without prefs, would it work with the fixed argument?

Updated by Joker
Posted

if i were to run the code without prefs, would it work with the fixed argument?

I don't think so. Try this code.

%hook SBReachabilitySettings
 
-(void)setReachabilityDefaultKeepAlive:(int)argument {
argument = 1;
return argument;
%orig;
}
%end

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines