Jump to content

Preference Bundle Error


Go to solution Solved by Crypto,

24 posts in this topic

Recommended Posts

Posted (edited)

I just tried to turn on and off and tried to respring still got nothing

Can you show me your tweak.xm and the .plist in your resources folder? (Not the info.plist)

Updated by Crypto
Posted

Can you show me your tweak.xm and the .plist in your resources folder? (Not the info.plist)

Yeah here is my tweak.xm

 

 

#define PLIST_PATH @"/var/mobile/Library/Preferences/ptest.plist"

 

inline bool GetPrefBool(NSString *key)

{

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

}

 

%hook MagicPerformanceStats

-(bool) isPerfect {

if(GetPrefBool(@"kPlan")) {

return true;

}

return %orig;

}

%end

 

 

And this is my plist

 

<?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>PSGroupCell</string>

<key>footerText</key>

<string>Magic Piano Cheats</string>

</dict>

<dict>

<key>cell</key>

<string>PSSwitchCell</string>

<key>default</key>

<true/>

<key>defaults</key>

<string>com.techprohacker.ptest</string>

<key>key</key>

<string>kPlan</string>

<key>label</key>

<string>Always perfect</string>

</dict>

</array>

<key>title</key>

<string>ptest</string>

</dict>

</plist>

Posted

Yeah here is my tweak.xm

#define PLIST_PATH @"/var/mobile/Library/Preferences/ptest.plist"

inline bool GetPrefBool(NSString *key)

{

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

}

%hook MagicPerformanceStats

-(bool) isPerfect {

if(GetPrefBool(@"kPlan")) {

return true;

}

return %orig;

}

%end

And this is my plist

<?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>PSGroupCell</string>

<key>footerText</key>

<string>Magic Piano Cheats</string>

</dict>

<dict>

<key>cell</key>

<string>PSSwitchCell</string>

<key>default</key>

<true/>

<key>defaults</key>

<string>com.techprohacker.ptest</string>

<key>key</key>

<string>kPlan</string>

<key>label</key>

<string>Always perfect</string>

</dict>

</array>

<key>title</key>

<string>ptest</string>

</dict>

</plist>

 

Change <string>com.techprohacker.ptest</string> to <string>ptest</string>

Posted

Change <string>com.techprohacker.ptest</string> to <string>ptest</string>

yay. that worked how can i add more switches for different hacks but with the same app

Posted

yay. that worked how can i add more switches for different hacks but with the same app

Add another PSSwitchCell in the resource .plist file and link the hack

Posted

Add another PSSwitchCell in the resource .plist file and link the hack

So this but just add the new hack ?

 

<key>items</key>

<array>

<dict>

<key>cell</key>

<string>PSGroupCell</string>

<key>footerText</key>

<string>Magic Piano Cheats</string>

</dict>

<dict>

<key>cell</key>

<string>PSSwitchCell</string>

<key>default</key>

<true/>

<key>defaults</key>

<string>ptest</string>

<key>key</key>

<string>kPlan</string>

<key>label</key>

<string>Always perfect</string>

</dict>

Posted

So this but just add the new hack ?

<key>items</key>

<array>

<dict>

<key>cell</key>

<string>PSGroupCell</string>

<key>footerText</key>

<string>Magic Piano Cheats</string>

</dict>

<dict>

<key>cell</key>

<string>PSSwitchCell</string>

<key>default</key>

<true/>

<key>defaults</key>

<string>ptest</string>

<key>key</key>

<string>kPlan</string>

<key>label</key>

<string>Always perfect</string>

</dict>

You have to add the PSGroupCell on top also :)

Posted (edited)

You have to add the PSGroupCell on top also :)

likes this

 

<key>items</key>

<array>

<dict>

<key>cell</key>

<string>PSGroupCell</string>

<key>footerText</key>

<string>Magic Piano Cheats</string>

</dict>

<dict>

<key>cell</key>

<string>PSSwitchCell</string>

<key>default</key>

<true/>

<key>defaults</key>

<string>ptest</string>

<key>key</key>

<string>kPlan</string>

<key>label</key>

<string>Always perfect</string>

</dict>

</array>

<key>title</key>

<string>ptest</string>

</dict>

</plist>

Updated by patricktph
Posted

If it's a 2nd hack, you don't need to put

<key>items</key>

<array>

 

You start with

 

<dict>

<key>cell</key>

<string>PSGroupCell</string>

<key>footerText</key>

<string>Magic Piano Cheats</string>

</dict>

<dict>

<key>cell</key>

<string>PSSwitchCell</string>

<key>default</key>

<true/>

<key>defaults</key>

<string>ptest</string>

<key>key</key>

<string>kPlan</string>

<key>label</key>

<string>Always perfect</string>

</dict>

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