Jump to content

How To Make Enable Switch in preferences


Go to solution Solved by castix,

7 posts in this topic

Recommended Posts

Posted

Hello ,

 

in dida THEOS template

 

 

we can do siwtch for every funciton

%hook something
 
-(int)method {
if(GetPrefBool(@"kKey")) {
return 9999999;
}
return %orig;
}

-(int)gems {       
if(GetPrefBool(@"kGems")) {
return 9999999;
}
return %orig;
}

-(unsigned int)lives {
if(GetPrefBool(@"kLives")) {
return 9999999;
}
return %orig;
}

%end

%hook SomethingElse

-(BOOL)SomeMethod {
if(GetPrefBool(@"kKEY5")) {
return TRUE;
}
return %orig;
}

-(BOOL)SomeMethod2 {
if(GetPrefBool(@"kKEY6")) {
return FALSE;
}
return %orig;
}

%end

We have 6 funciton with 6 switcher

 

but i want make 1 switcher for 6 funciton

 

Enable/Disable

 

something like this

 

If All funciton ok

enable the tweak

 

 

else

disable

 

 

Thank U :)

 

 

Posted (edited)


%hook something

- (int)method {

if(GetPrefBool(@"enable")) {

return 9999999;

}

return %orig;

}

 

- (int)gems {

if(GetPrefBool(@"enable")) {

return 9999999;

}

return %orig;

}

 

- (unsigned int)lives {

if(GetPrefBool(@"enable")) {

return 9999999;

}

return %orig;

}

%end

 

%hook SomethingElse

- (BOOL)SomeMethod {

if(GetPrefBool(@"enable")) {

return true;

}

return %orig;

}

 

- (BOOL)SomeMethod2 {

if(GetPrefBool(@"enable")) {

return false;

}

return %orig;

}

%end


<dict>

    <key>cell</key>

    <string>PSGroupCell</string>

    <key>key</key>

    <string>enable</string>

    <key>defaults</key>

    <string>sampletext</string>

    <key>default</key>

    </false>

    <key>label</key>

    <string>sampletext</string>

    <key>icon</key>

    <string>icon.png</string>

</dict>

 

Updated by z0ne
Posted
%hook something
- (int)method {
    if(GetPrefBool(@"enable")) {
    return 9999999;
    }
    return %orig;
}

- (int)gems { 
    if(GetPrefBool(@"enable")) {
    return 9999999;
    }
    return %orig;
}

- (unsigned int)lives {
    if(GetPrefBool(@"enable")) {
    return 9999999;
    }
    return %orig;
}
%end

%hook SomethingElse
- (BOOL)SomeMethod {
    if(GetPrefBool(@"enable")) {
    return true;
    }
    return %orig;
}

- (BOOL)SomeMethod2 {
    if(GetPrefBool(@"enable")) {
    return false;
    }
    return %orig;
}
%end
<dict>
    <key>cell</key>
    <string>PSGroupCell</string>
    <key>key</key>
    <string>enable</string>
    <key>defaults</key>
    <string>sampletext</string>
    <key>default</key>
    </false>
    <key>label</key>
    <string>sampletext</string>
    <key>icon</key>
    <string>icon.png</string>
</dict>

 

 

Thank you for replay

 

 

I have problem when save plist file

 

vaule missing for key inside <dict> at line 16 .

 

my plist file

<?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>key</key>
    <string>enable</string>
    <key>defaults</key>
    <string>Disable</string>
    <key>default</key>
    </false>
    <key>label</key>
    <string>Enable</string>
    <key>icon</key>
    <string>icon.png</string>
</dict>
			<dict>
			<key>cell</key>
			<string>PSTextCell</string>
			<key>label</key>
			<string>Made by Yazeed Alotaibi.</string>
		</dict>
		<dict>
			<key>action</key>
			<string>link</string>
			<key>cell</key>
			<string>PSButtonCell</string>
			<key>icon</key>
			<string>[email protected]</string>
			<key>label</key>
			<string>Visit ZezBlog.com</string>
		</dict>
	</array>
	<key>title</key>
	<string>PlayYTinBG</string>
</dict>
</plist>

  • Solution
Posted

What's the plist name because

<key>defaults</key>
<string>Disable</string>
<key>default</key>
</false>
<key>label</key>
<string>Enable</string>
<key>icon</key>
<string>icon.png</string>
</dict>

you edited this part wrong

Posted

What's the plist name because

<key>defaults</key>
<string>Disable</string>
<key>default</key>
</false>
<key>label</key>
<string>Enable</string>
<key>icon</key>
<string>icon.png</string>
</dict>

you edited this part wrong

 

plist name PlayYTinBG.plist

 

 

package name : com.zezblog.playytinbg

Posted

Sloved

        <dict>
            <key>cell</key>
            <string>PSSwitchCell</string>
            <key>default</key>
            <false/>
            <key>defaults</key>
            <string>com.zezblog.playytinbg</string>
            <key>key</key>
            <string>enable</string>
            <key>label</key>
            <string>enable</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
  • Our picks

    • Forest Cabin: Survive v2.00.019 [ +4 Cheats ] Battle Coins
      Modded/Hacked App: Forest Cabin: Survive By HARVEST STAR INTERACTIVE LIMITED
      Bundle ID: com.qxgame.gmerge
      App Store Link: https://apps.apple.com/us/app/forest-cabin-survive/id6755801812?uo=4

      🤩 Hack Features

      - Speed 2X Active
      - Unlimited Battle Coin
      - Unlimited Battle Energy
      - ATK Speed
        • Informative
        • Agree
        • Winner
        • Like
      • 9 replies
    • Forest Cabin: Survive v2.00.019 [ +4 Jailed ] Battle Coins
      Modded/Hacked App: Forest Cabin: Survive By HARVEST STAR INTERACTIVE LIMITED
      Bundle ID: com.qxgame.gmerge
      App Store Link: https://apps.apple.com/us/app/forest-cabin-survive/id6755801812?uo=4

      🤩 Hack Features

      - Speed 2X Active
      - Unlimited Battle Coin
      - Unlimited Battle Energy
      - ATK Speed
        • Informative
        • Winner
        • Like
      • 5 replies
    • Michi Café: Cat Café v1.3.92 [ +1 Cheats ] Coin Unlimited
      Modded/Hacked App: Michi Café: Cat Café By Juan Bustos
      Bundle ID: com.Pintordenubes.Michi-Cafe
      App Store Link: https://apps.apple.com/vn/app/michi-caf%C3%A9-cat-caf%C3%A9/id6756552185?uo=4

      🤩 Hack Features

      - Unlimited Coins
        • Like
      • 3 replies
    • Michi Café: Cat Café v1.3.92 [ +1 Jailed ] Coin Unlimited
      Modded/Hacked App: Michi Café: Cat Café By Juan Bustos
      Bundle ID: com.Pintordenubes.Michi-Cafe
      App Store Link: https://apps.apple.com/vn/app/michi-caf%C3%A9-cat-caf%C3%A9/id6756552185?uo=4
      🤩 Hack Features

      - Unlimited Coins
        • Like
      • 2 replies
    • World of Artillery Tank Fire v2.0.26 [ +7 Cheats ] Easy Win
      Modded/Hacked App: World of Artillery: Tank Fire By CHEELY APPS TOO
      Bundle ID: com.battle.worldofartillery
      iTunes Store Link: https://apps.apple.com/us/app/world-of-artillery-tank-fire/id1660614297?uo=4
      Hack Features:
      - Anti Cheat
      - Premium
      - Damage
      - Ammo
      - No Reload
      - Energy
      - 1 Kill To Win
        • Informative
        • Agree
        • Haha
        • Thanks
        • Like
      • 38 replies
    • World of Artillery Tank Fire v2.0.26 [ +7 Jailed ] Easy Win
      Modded/Hacked App: World of Artillery: Tank Fire By CHEELY APPS TOO
      Bundle ID: com.battle.worldofartillery
      App Store Link: https://apps.apple.com/us/app/world-of-artillery-tank-fire/id1660614297?uo=4

      🤩 Hack Features

      - Anti Cheat
      - Premium
      - Damage
      - Ammo
      - No Reload
      - Energy
      - 1 Kill To Win
        • Thanks
        • Like
      • 3 replies
    • UnderGuild: Offense v1.4.8 [ +3 Cheats ] Currency Max
      Modded/Hacked App: UnderGuild: Offense By SeungHo Chung
      Bundle ID: com.FreeDust.UnderDarkOffense
      App Store Link: https://apps.apple.com/us/app/underguild-offense/id6752882356?uo=4

      🤩 Hack Features

      - Unlimited Diamond
      - Unlimited Gold
      - Max Trop
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 47 replies
    • UnderGuild: Offense v1.4.8 [ +3 Jailed ] Currency Max
      Modded/Hacked App: UnderGuild: Offense By SeungHo Chung
      Bundle ID: com.FreeDust.UnderDarkOffense
      App Store Link: https://apps.apple.com/us/app/underguild-offense/id6752882356?uo=4

      🤩 Hack Features

      - Unlimited Diamond
      - Unlimited Gold
      - Max Trop
        • Informative
        • Agree
        • Winner
        • Like
      • 37 replies
    • Wool Craze -Yarn Color Sort 3D v5.6 [ +4 Jailed ] Currency Max
      Modded/Hacked App: Wool Craze -Yarn Color Sort 3D By Hero Linkage Technology Co., Ltd.
      Bundle ID: com.color.wool.blast
      App Store Link: https://apps.apple.com/us/app/wool-craze-yarn-color-sort-3d/id6744317674?uo=4

      🤩 Hack Features

      - Unlimited Coins
      - Unlimited Stars
      - Unlimited Life
      - Unlimited Booster
        • Haha
        • Like
      • 7 replies
    • Wool Craze -Yarn Color Sort 3D v5.6 [ +4 Cheats ] Currency Max
      Modded/Hacked App: Wool Craze -Yarn Color Sort 3D By Hero Linkage Technology Co., Ltd.
      Bundle ID: com.color.wool.blast
      App Store Link: https://apps.apple.com/us/app/wool-craze-yarn-color-sort-3d/id6744317674?uo=4

      🤩 Hack Features

      - Unlimited Coins
      - Unlimited Stars
      - Unlimited Life
      - Unlimited Booster
        • Like
      • 11 replies
    • Claw Quest: Roguelike RPG v1.2.3 [ +15 Cheats ] Currency Max
      Modded/Hacked App: Claw Quest: Roguelike RPG By Hexpion Pte. Ltd.
      Bundle ID: com.hexpion.sixpzeroeight
      App Store Link: https://apps.apple.com/us/app/claw-quest-roguelike-rpg/id6749590073?uo=4

      🤩 Hack Features

      - ADS NO / Rewards Free
      - Month Cards Active
      - Daily Rewards
      - Premium Pass Active
      - Unlimited Battle Coins / Use In Battle Store
      - Unlimited Battle Crystal / Use In Battle Store
      - Unlimited Battle Mana / Use In Battle Store
      - Unlimited Gems
      - Unlimited Gold
      - Unlimited Energy
      - Unlimited S Keys
      - Unlimited Legendary Keys
      - Unlimited Golden Keys
      - Unlimited Silver Keys
      - Unlimited Shard
        • Like
      • 11 replies
    • Claw Quest: Roguelike RPG v1.2.3 [ +15 Jailed ] Currency Max
      Modded/Hacked App: Claw Quest: Roguelike RPG By Hexpion Pte. Ltd.
      Bundle ID: com.hexpion.sixpzeroeight
      App Store Link: https://apps.apple.com/us/app/claw-quest-roguelike-rpg/id6749590073?uo=4

      🤩 Hack Features

      - ADS NO / Rewards Free
      - Month Cards Active
      - Daily Rewards
      - Premium Pass Active
      - Unlimited Battle Coins / Use In Battle Store
      - Unlimited Battle Crystal / Use In Battle Store
      - Unlimited Battle Mana / Use In Battle Store
      - Unlimited Gems
      - Unlimited Gold
      - Unlimited Energy
      - Unlimited S Keys
      - Unlimited Legendary Keys
      - Unlimited Golden Keys
      - Unlimited Silver Keys
      - Unlimited Shard
        • Winner
        • Like
      • 18 replies
×
  • 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