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

    • Sheep Dash-Farm Animal Escape (Auto Update) Jailed Cheats +3
      Modded/Hacked App: Sheep Dash-Farm Animal Escape By WINLON PTE. LTD.
      Bundle ID: com.sheeprun.chick.farm
      App Store Link: https://apps.apple.com/us/app/sheep-dash-farm-animal-escape/id6754862574?uo=4

       

      📌 Mod Requirements

      - Non-Jailbroken/Jailed or Jailbroken iPhone or iPad.
      - Sideloadly or alternatives.
      - Computer running Windows/macOS/Linux with iTunes installed.

       

      🤩 Hack Features

      - Infinite Coins
      - Infinite Boosters
      - No Ads

       

      ⬇️ iOS Hack Download IPA Link: https://iosgods.com/topic/214481-sheep-dash-farm-animal-escape-auto-update-jailed-cheats-3/
      • 0 replies
    • Dragon's Rush +3++ Mods [ Damage & Defence ]
      Mod APK Game Name: Dragon's Rush By TsyaTsya
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.tsyatsya.dragonsrush

       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Unlimited Currencies -> Earn or spend some.
      • 0 replies
    • Disney Magic Match 3D +4 Jailed Cheats [ Unlimited Everything ]
      Modded/Hacked App: Disney Magic Match 3D By Jam City, Inc.
      Bundle ID: com.jamcity.pdt
      App Store Link: https://apps.apple.com/us/app/disney-magic-match-3d/id6468690398?uo=4

       


      🤩 Hack Features

      - Unlimited Coins
      - Unlimited Lives
      - Unlimited Pre-Game Boosters
      - Unlimited In-Game Boosters
      • 8 replies
    • Vampire Survivors +4 Mods [ Damage & Defence ]
      Mod APK Game Name: Vampire Survivors By Poncle
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.poncle.vampiresurvivors

       

      🤩 Hack Features

      - Damage Multiplier 
      - Defence Multiplier
      - God Mode
      - Unlock All Weapons -> Head over to Options and toggle the Sounds button.
      • 2 replies
    • Vampire Survivors +4 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Vampire Survivors By Poncle
      Bundle ID: com.poncle.VampireSurvivors
      iTunes Store Link: https://apps.apple.com/us/app/vampire-survivors/id6444525702
       

      Hack Features:
      - Damage Multiplier
      - Defence Multiplier
      - All Weapons Unlocked -> Head over to Options and toggle the Sounds button.


      Jailbreak required hack(s): [Mod Menu Hack] Vampire Survivors v1.6.104 +5 Cheats [ Damage & Defence ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 158 replies
    • Idle Gas Station Tycoon +2 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Idle Gas Station Tycoon By Lime Games LLC
      Bundle ID: com.limegames.idlegas
      iTunes Store Link: https://apps.apple.com/us/app/idle-gas-station-tycoon/id6446057753?uo=4


      Hack Features:
      - Unlimited Cash -> Will increase instead of decrease.
      - Unlimited Gems -> Will increase instead of decrease.


      Jailbreak required hack(s): [Mod Menu Hack] Idle Gas Station Tycoon v1.2 +2 Cheats [ Unlimited Currencies ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 6 replies
    • Loot Heroes: Fantasy RPG Games +28 Jailed Cheats [ Unlimited Everything ]
      Modded/Hacked App: Loot Heroes: Fantasy RPG Games By BoomBit, Inc.
      Bundle ID: com.bbp.lootheroes
      iTunes Store Link: https://apps.apple.com/us/app/loot-heroes-fantasy-rpg-games/id6642699678?uo=4


      Hack Features:
      - Freeze Everything -> Currencies, Hero Cards, Hero Skill Points will all freeze.
      - God Mode -> Traps still cause damage.
      - One-Hit Kill
      - No Attack Delay
      - All Critical Hits
      - All Heroes Unlocked
      - All Skins Unlocked
      - No Skill Cooldown
      - Nickname Edit Unlocked
      - No Nickname Filter
      - No Guild Name Filter
      - No Dash Cooldown
      - Unlimited Boosters
      - Auto Play
      - No Camp Upgrade Cost
      - Unlimited Bolts
      - No Ads

      VIP
      - Unlimited Everything -> Currencies, Hero Cards, Hero Skill Points will all increase instead of decrease.
      - Currency Modifier -> Earn or spend some.
      - Unlimited Hero Cards -> Earn some.
      - Unlimited Hero Skill Points -> Earn some.
      - Trophy Modifier -> Earn or lose some to stick to the leaderboard.
      - Guild Score Modifier -> Earn some.
      - Unlimited Event Score -> Earn some.
      - Max Hero Mastery Level
      - Auto Win
      - Battle Pass Unlocked
      - VIP Enabled
      • 248 replies
    • Merge City - Travel & Story v1.3.1 [ +3 APK MOD ] Currency Max
      Mod APK Game Name: Merge City - Travel & Story
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.bigcool.puzzle.merge.city&hl=en

      🤩 Hack Features

      - Unlimited Gold
      - Unlimited Cash
      - Energy / Buy With Gold
      • 0 replies
    • Merge City: Travel & Story v1.3.1 [ +3 Cheats ] Currency Max
      Modded/Hacked App: Merge City: Travel & Story By Hangzhou Mengku Technology Co., Ltd.
      Bundle ID: com.bigcool.puzzle.merge.city
      App Store Link: https://apps.apple.com/us/app/merge-city-travel-story/id6760990504?uo=4

      🤩 Hack Features

      - Unlimited Gold
      - Unlimited Cash
      - Unlimited Energy
      • 2 replies
    • Merge City: Travel & Story v1.3.1 [ +3 Jailed ] Currency Max
      Modded/Hacked App: Merge City: Travel & Story By Hangzhou Mengku Technology Co., Ltd.
      Bundle ID: com.bigcool.puzzle.merge.city
      App Store Link: https://apps.apple.com/us/app/merge-city-travel-story/id6760990504?uo=4

      🤩 Hack Features

      - Unlimited Gold
      - Unlimited Cash
      - Unlimited Energy
      • 2 replies
    • Idle Berserker Legend Of Kali +2 Mods [ Damage + More ]
      Mod APK Game Name: Idle Berserker Legend Of Kali By A1GAMES
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.a1gamesstudio.berserker

       

      🤩 Hack Features

      - Damage Multiplier
      - No Skill Cooldown
      • 1 reply
    • Backpack Legends Adventure RPG +1++ Jailed Cheat [ Unlimited Currencies ]
      Modded/Hacked App: Backpack Legends Adventure RPG By ONDI TECHNOLOGY JSC
      Bundle ID: com.ondi.pack.adventure
      App Store Link: https://apps.apple.com/us/app/backpack-legends-adventure-rpg/id6755376569?uo=4

       

      🤩 Hack Features

      - Unlimited Currencies -> Will increase instead of decrease.
      • 1 reply
×
  • 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