Require:
- Theos
- Project with Preferences Bundle
- I'll be using mcpe mod sprint
- Knowledge of hacking
- knowledge of Preferences Bundle A Tutorial can be found here http://iosgods.com/topic/444-how-to-make-a-preference-bundle/
Instructions:
#import <CoreFoundation/CoreFoundation.h>
#import <substrate.h>
#import <Foundation/Foundation.h>
#define prefs @"/var/mobile/Library/Preferences/com.kenny808.mcpemods.plist"
inline bool GetPrefBool(NSString *key){
return [[[NSDictionary dictionaryWithContentsOfFile:prefs] valueForKey:key] boolValue];
}
%hook minecraftpeAppDelegate
- (void)applicationDidBecomeActive:(id)non {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"MCPE MODS:" message:@"Mods by Kenny808 Enjoy :)" delegate:nil cancelButtonTitle:@"Thank You!" otherButtonTitles:nil];
[alert show];
[alert release];
}
%end
float (*orig__ZN6Player23getWalkingSpeedModifierEv)(void *self, unsigned int i1);
float __ZN6Player23getWalkingSpeedModifierEv(void *self, unsigned int i1) {
if(GetPrefBool(@"kspeed"))
{
return 1.5f;
}
else
{
return orig__ZN6Player23getWalkingSpeedModifierEv(self,i1);
}
}
__attribute__((constructor)) void DylibMain()
{
MSHookFunction(((void*)MSFindSymbol(NULL,"__ZN6Player23getWalkingSpeedModifierEv")),(void *)__ZN6Player23getWalkingSpeedModifierEv,(void**)&orig__ZN6Player23getWalkingSpeedModifierEv);
}
1.Here a example...
2. then go to your resource folder and go to .plist file not the info.plist
And then type "kname" my is "kspeed" be sure the PSSwitchcell is false
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>items</key>
<array>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<false/>
<key>defaults</key>
<string>com.kenny808.mcpemods</string>
<key>key</key>
<string>kspeed</string>
<key>label</key>
<string>Sprint Mod</string>
</dict>
</array>
<key>title</key>
<string>Mods</string>
</dict>
</plist> Then compile it