Jump to content

3 posts in this topic

Recommended Posts

Posted

Hello there i follow this post for [Preference Bundle] :

 [TUTORIAL] How To Make a Preference Bundle

 

and in the end tweak don't like with switch button and here my tweak cod after i follow this post :

#import <UIKit/UIKit.h>
#define PLIST_PATH @"/Users/test/Desktop/dump-tweak/Randy420/tearbcrack/Resources/Root.plist"     //here the name of your .plist (it's stored in the "Resources" folder)
 
inline bool GetPrefBool(NSString *key)
{
return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}
%hook _TtC5Tarab11SwiftHelper


-(bool)isPremiumSubscriptionActive {
if(GetPrefBool(@"kPremiumSubscriptionActive")) {            
return 1;
}
return %orig;
}
-(bool)isPremiumSubscriptionExpired {
if(GetPrefBool(@"kPremiumSubscriptionActive")) {            
return 1;
}
return %orig;
}
%end

and this my original patch :

#import <UIKit/UIKit.h>

%hook _TtC5Tarab11SwiftHelper
- (bool)isPremiumSubscriptionActive {
    return 1;
}
- (bool)isPremiumSubscriptionExpired {
    return 0;
}
%end

 

also i use my mac for coding 

can anyone help my with that ?

Posted
11 hours ago, Xnoobxtest12 said:
#define PLIST_PATH @"/Users/test/Desktop/dump-tweak/Randy420/tearbcrack/Resources/Root.plist"

This seems to be incorrect.

It should be like so: 

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

inline bool GetPrefBool(NSString *key) {
	return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}

 

You may be developing on Mac, but you will be releasing this for iOS.

Posted
22 hours ago, Rook said:

This seems to be incorrect.

It should be like so: 

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

inline bool GetPrefBool(NSString *key) {
	return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}

 

You may be developing on Mac, but you will be releasing this for iOS.

"/var/mobile/Library/Preferences/PACKAGENAME.plist"

here pakagename which packgename is should use here also it not work and this is my code :

#import <UIKit/UIKit.h>
#define PLIST_PATH @"/var/mobile/Library/Preferences/com.repo0x.test.plist"
inline bool GetPrefBool(NSString *key) {
	return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}
%hook _TtC5Tarab11SwiftHelper
-(bool)isPremiumSubscriptionActive {
if(GetPrefBool(@"kPremiumSubscriptionActive")) {            
    return 1;
}
return %orig;
}
-(bool)isPremiumSubscriptionExpired {
if(GetPrefBool(@"kPremiumSubscriptionActive")) {            

    return 1;
}
return %orig;
}
%end

also i use my pc maybe  because that ?

 

that all my files :

Tweak 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>Filter</key>
	<dict>
		<key>Bundles</key>
		<array>
			<string>com.appmania.TarabApp</string>
		</array>
	</dict>
</dict>
</plist>

Root.plist in :

<?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>label</key>
			<string>Terabcrack First Page</string>
		</dict>
		<dict>
			<key>cell</key>
			<string>PSSwitchCell</string>
			<key>default</key>
			<true/>
			<key>defaults</key>
			<string>com.repo0x.test</string>
			<key>key</key>
			<string>AwesomeSwitch1</string>
			<key>label</key>
			<string>Enable</string>
		</dict>
	</array>
	<key>title</key>
	<string>Terabcrack</string>
</dict>
</plist>

 

this all my file it now working !!

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