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

    • Shadow Survival Vampire game v1.8.4 [ +5 Cheats ] OHK
      Modded/Hacked App: Shadow Survival: Vampire game By AlohaFactory
      Bundle ID: com.LiberalDust.DarkSurvival2
      iTunes Store Link: https://apps.apple.com/us/app/shadow-survival-vampire-game/id6467580965?uo=4


      Hack Features:
      - Anti-Cheat

      - Skill Cooldown

      - Damage

      - Good Mod [ Get Skill Between The Playing ]

      - Pickup Range
      • 38 replies
    • Shadow Survival Vampire game v1.8.4 [ +5 Jailed ] OHK
      Modded/Hacked App: Shadow Survival: Vampire game By AlohaFactory
      Bundle ID: com.LiberalDust.DarkSurvival2
      iTunes Store Link: https://apps.apple.com/us/app/shadow-survival-vampire-game/id6467580965?uo=4


      🚀 Hack Features

      - Anti-Cheat

      - Skill Cooldown

      - Damage

      - Good Mod [ Get Skill Between The Playing ]

      - Pickup Range
      • 16 replies
    • Match Heroes - RPG v4.1 [ +4 Cheats ] Currency Max
      Modded/Hacked App: Match Heroes - RPG By Tapugo FZCO
      Bundle ID: com.tapugo.matchheroes
      App Store Link: https://apps.apple.com/ph/app/match-heroes-rpg/id6749947030?uo=4

      🤩 Hack Features

      - Unlimited Gold / Arena Rewards
      - Unlimited HP
      - Unlimited ATK
      - Unlimited DEF
      • 4 replies
    • Match Heroes - RPG v4.1 [ +4 Jailed ] Currency Max
      Modded/Hacked App: Match Heroes - RPG By Tapugo FZCO
      Bundle ID: com.tapugo.matchheroes
      App Store Link: https://apps.apple.com/ph/app/match-heroes-rpg/id6749947030?uo=4

      🤩 Hack Features

      - Unlimited Gold / Arena Rewards
      - Unlimited HP
      - Unlimited ATK
      - Unlimited DEF
      • 2 replies
    • Darkest Hero! v0.1.4 [ +4 Jailed ] Currency Max
      Modded/Hacked App: Darkest Hero! By MINIDRAGON LTD
      Bundle ID: com.minidragon.randomdungeon
      App Store Link: https://apps.apple.com/us/app/darkest-hero/id6746927122?uo=4

      🤩 Hack Features

      - Unlimited Gems / Earn
      - Unlimited Red Crystal / Earn
      - Unlimited Gold / Earn
      - Unlimited Keys / Earn
      • 24 replies
    • Darkest Hero! v0.1.4 [ +4 Cheats ] Currency Max
      Modded/Hacked App: Darkest Hero! By MINIDRAGON LTD
      Bundle ID: com.minidragon.randomdungeon
      App Store Link: https://apps.apple.com/us/app/darkest-hero/id6746927122?uo=4

      🤩 Hack Features

      - Unlimited Gems / Earn
      - Unlimited Red Crystal / Earn
      - Unlimited Gold / Earn
      - Unlimited Keys / Earn
      • 27 replies
    • Paradise Paws: Merge Animals v1.0.35 [ +12 Jailed ] Currency Max
      Modded/Hacked App: Animal Sanctuary By Wildlife Studios, Inc
      Bundle ID: com.wildlifestudios.merge.animal.sanctuary
      App Store Link: https://apps.apple.com/us/app/animal-sanctuary/id6741805691?uo=4


      🤩 Hack Features

      - Gems

      - Coins

      - Heart

      - Spin

      - LvL

      - Exp

      - Fog Auto Remove [ Linked With LvL ]

      - Premum Lands Unlocked [ Just Tap ]

      - Store Free [ IAP Not ]

      Note:- Game Close After Currency Hack Don't Worry
        • Agree
      • 69 replies
    • Paradise Paws: Merge Animals v1.0.35 [ +12 Cheats ] Currency Max
      Modded/Hacked App: Animal Sanctuary By Wildlife Studios, Inc
      Bundle ID: com.wildlifestudios.merge.animal.sanctuary
      App Store Link: https://apps.apple.com/us/app/animal-sanctuary/id6741805691?uo=4
       

      🤩 Hack Features

      - Gems

      - Coins

      - Heart

      - Spin

      - LvL

      - Exp

      - Fog Auto Remove [ Linked With LvL ]

      - Premum Lands Unlocked [ Just Tap ]

      - Store Free [ IAP Not ]

      Note:- Game Close After Currency Hack Don't Worry
        • Like
      • 48 replies
    • Starbrew Cafe: Mystical Merge v1.65.1 [ +4 Cheats ] Currency Max
      Modded/Hacked App: Starbrew Cafe: Mystical Merge By Extra Dimension Games Inc.
      Bundle ID: games.extradimension.cafemerge
      App Store Link: https://apps.apple.com/us/app/starbrew-cafe-mystical-merge/id6456751444?uo=4

        

      🤩 Hack Features

      - Gems      --- In Store Buy Items [ Items Sale Price ] Show Free When You Buy Then Get Gems
      - Coins
      - Energy [ Buy Cost 0 ]
      - All Order Completed
      • 19 replies
    • Starbrew Cafe: Mystical Merge v1.65.1 [ +4 Jailed ] Currency Max
      Modded/Hacked App: Starbrew Cafe: Mystical Merge By Extra Dimension Games Inc.
      Bundle ID: games.extradimension.cafemerge
      App Store Link: https://apps.apple.com/us/app/starbrew-cafe-mystical-merge/id6456751444?uo=4
       

      🤩 Hack Features

      - Gems  --- In Store Buy Items [ Items Sale Price ] Show Free When You Buy Then Get Gems
      - Coins
      - Energy [ Buy Cost 0 ]
      - All Order Completed
      • 21 replies
    • Star2 Random Defense(S2RD) v1.0.9 +10 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Star2 Random Defense(S2RD) By Springcomes Co., Ltd.
      Bundle ID: com.gaimstudio.s2rd
      App Store Link: https://apps.apple.com/us/app/star2-random-defense-s2rd/id6739694467?uo=4

       

      🤩 Hack Features

      - Freeze Food
      - Freeze Silver
      - Freeze Essence
      - Freeze Either
      - Freeze Gold
      - Freeze Diamonds
      - Freeze Energy

      VIP
      - Unlimited Gold -> Will increase instead of decrease.
      - Unlimited Diamonds -> Will increase instead of decrease.
      - Unlimited Energy -> Will increase instead of decrease.
      • 14 replies
    • Epic Shaman Battle: 4P Defense v1.5.2 +2 Jailed Cheats [ Damage + More ]
      Modded/Hacked App: Epic Shaman Battle: 4P Defense By Crater Co., Ltd.
      Bundle ID: com.percent.ios.p4defense
      iTunes Store Link: https://apps.apple.com/us/app/epic-shaman-battle-4p-defense/id6511224754?uo=4

       


      🤩 Hack Features

      - God Mode
      - Damage Multiplier
      • 44 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