Skip to content
Guest Big Announcement

Help me with something...

Featured Replies

hey guys :D can someone please help me create a pref bundle for my tweak? it is greatly appreciated!

 

I'l give you guys my tweak.xm and plist stuff.

 

Tweak:

#define PLIST_PATH @"/var/mobile/Library/Preferences/pref.plist"
 
inline bool GetPrefBool(NSString *key)
{
return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}
 
%hook SBIconController
 
-(BOOL)allowsUninstall{
return FALSE;
}
%end
 
Plist in resources:
 
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>entry</key>
<dict>
<key>cell</key>
<string>PSLinkCell</string>
<key>icon</key>
<string>icon.png</string>
<key>label</key>
<string>XXX Hack</string>
</dict>
<key>items</key>
<array>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string>Enable!</string></dict>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<false/>
<key>defaults</key>
<string>com.AsD.pref</string>
<key>key</key>
<string>allowsUninstall</string>
<key>label</key>
<string>Infinite Coins</string>       
</dict>
                <dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string>High number of gems</string>    
</dict>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<false/>
<key>defaults</key>
<string>xxxx</string>       
<key>key</key>
<string>kGems</string>      
<key>label</key>
<string>Infinite Gems</string>       
</dict>
</array>
<key>title</key>
<string>XXX Hack</string>
</dict>
</plist> 
 
 
This bundle ^ isn't complete so your help is greatly appreciated! Thanks!

 

This should be in the Tweak.xm:

#define PLIST_PATH @"/var/mobile/Library/Preferences/com.AsD.pref.plist"
 
inline bool GetPrefBool(NSString *key)
{
return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}
%hook SBIconController 

-(BOOL)allowsUninstall {
if(GetPrefBool(@"kUninstall")) {
return FALSE;
}
return %orig;
}
%end

Updated by DiDA

  • Author

yayyy


my tweak.xm is ^

this is my plist now:

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>entry</key>
<dict>
<key>cell</key>
<string>PSLinkCell</string>
<key>icon</key>
<string>icon.png</string>
<key>label</key>
<string>XXX Hack</string>
</dict>
<key>items</key>
<array>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string>Tons of coins for you</string>         
</dict>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<false/>
<key>defaults</key>
<string>com.AsD.pref</string>
<key>key</key>
<string>kUninstall</string>
<key>label</key>
<string>Infinite Coins</string>    
</dict>
          </array>
<key>title</key>
<string>XXX Hack</string>
</dict>
</plist> 
 
 
 
I still haven't changed some titles

Create an account or sign in to comment

Featured Content

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.