Jump to content

Code keep return %orig;


Go to solution Solved by castix,

11 posts in this topic

Recommended Posts

Posted
%hook targetClass
-(bool)istargetmethodActive{
	
	if ([[prefs objectForKey:@"keyFromPlist"] boolValue]){

		return true;

	}

	return %orig;

}
%end

I've tried running and make countless changes but the results is still the same. The problem is, when I try On or Off my tweak via Preference (in Settings app), the code keep return %orig;

 

Please help.

Posted

istargetmethodActive is case sensitive, have you copied it correctly?

 

Yes. I'm 100% sure and confident. I just want a simple workflow:

 

1. User turn the switch OFF = The tweak is not working.

2. User turn the switch ON = The tweak is working.

 

Unfortunately, nothing seems to work according my plan.

Posted


-(bool)istargetmethodActive{

 

if ([[prefs objectForKey:@"keyFromPlist"] boolValue]){

 

return true;

 

} else {

 

return %orig;

 

}

%end

Posted
-(bool)istargetmethodActive{
	
	if ([[prefs objectForKey:@"keyFromPlist"] boolValue]){

		return true;

	} else {

	return %orig;

}
%end

Got this error while processing to package... 

Tweak.xm:46: error: %end does not make sense inside a block
Posted

Forgot to close out. Set another } at the end

 

Thanks, code my code it's working now. But it seems I'm facing another problem. 

 

Quote fro Stackoverflow

 

 

 

If the key does not exist in the user defaults, the result of this method will be NO.

 

I'm facing this issue now. I think /Library/PreferenceBundles/yourtweak.bundle/yourplistname.plist  can't be read by Preference.

  • Solution
Posted (edited)

Thanks, code my code it's working now. But it seems I'm facing another problem. 

 

Quote fro Stackoverflow

 

 

I'm facing this issue now. I think /Library/PreferenceBundles/yourtweak.bundle/yourplistname.plist  can't be read by Preference.

#define kPath @"/var/mobile/Library/Preferences/YOUR_PLIST_NAME.plist"


%hook targetClass
-(bool)istargetmethodActive {
NSDictionary *prefs=[[NSDictionary alloc] initWithContentsOfFile:kPath];
%orig;
    if ([[prefs objectForKey:@"keyFromPlist"] boolValue]){
    return true;
    } else {
    return %orig;
  }
}
%end
Updated by castix

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

    • We Are Illuminati: UFO Clicker (Auto Update) Jailed Cheats +1
      Modded/Hacked App: We Are Illuminati - Clicker by Tapps Tecnologia da Informacao LTDA.
      Bundle ID: br.com.tapps.weareilluminati
      iTunes Store Link: https://itunes.apple.com/us/app/we-are-illuminati-clicker/id1291037694?mt=8&uo=4&at=1010lce4



      Hack Features:
      - Free iAP (Turn it on inside mod menu)


      Hack Download Link: https://iosgods.com/topic/97760-arm64-we-are-illuminati-clicker-v144-jailed-cheats-1/
      • 23 replies
    • Frost & Flame: King of Avalon v23.6.20 Jailed Cheats +2
      Modded/Hacked App: Frost & Flame: King of Avalon By FunPlus International AG
      Bundle ID: com.diandian.kingofavalon
      App Store Link: https://apps.apple.com/us/app/frost-flame-king-of-avalon/id1084930849?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

      - God Mode
      - Multiply  Attack

       

      Jailbroken Hack: https://iosgods.com/topic/188620-frost-flame-king-of-avalon-cheats-auto-update-2/

       

      ⬇️ iOS Hack Download IPA Link: https://iosgods.com/topic/188621-frost-flame-king-of-avalon-v2350-jailed-cheats-2/
      • 25 replies
    • Wiggle Defender: Strategy TD v0.0.46 Jailed Cheats +3
      Modded/Hacked App: Wiggle Defender: Strategy TD By Teamsparta Inc.
      Bundle ID: com.TeamSparta.WiggleDefender
      App Store Link: https://apps.apple.com/us/app/wiggle-defender-strategy-td/id6756547841?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

      - Multiply Attack
      - Free Store (not iAP)
      - PREMIUM

       

      Jailbroken Hack: https://iosgods.com/topic/204454-wiggle-defender-strategy-td-cheats-v0011-3/

       

      ⬇️ iOS Hack Download IPA Link: https://iosgods.com/topic/204452-wiggle-defender-strategy-td-v0011-jailed-cheats-3/
      • 15 replies
    • Idle Slayer: Pixel AFK RPG (Auto Update) Jailed Cheats +1
      Modded/Hacked App: Idle Slayer: Pixel AFK RPG By Pablo Leban
      Bundle ID: com.PabloLeban.IdleSlayer
      App Store Link: https://apps.apple.com/us/app/idle-slayer-pixel-afk-rpg/id1526599527?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

      - Unlimited Gems (Increase when Use)

       

      ⬇️ iOS Hack Download IPA Link: https://iosgods.com/topic/183803-idle-slayer-pixel-afk-rpg-v645-jailed-cheats-1/
      • 34 replies
    • Dice Dreams Cheats (Auto Update) +2
      Modded/Hacked App: Dice Dreams™ By SuperPlay LTD
      Bundle ID: com.superplaystudios.dicedreams
      iTunes Store Link: https://apps.apple.com/us/app/dice-dreams/id1484468651?uo=4


      Hack Features:
      - Custom Rolls
      - Unlimited Coins - afford regardless of if you have enough


      iOS Hack Download Link: https://iosgods.com/topic/138011-dice-dreams%E2%84%A2-v1692-2-cheats/
        • Like
      • 678 replies
    • Sniper 3D: Gun Shooting Games (Auto Update) Jailed Cheats +5
      Modded/Hacked App: Sniper 3D Assassin: FPS Battle By Fun Games For Free
      Bundle ID: com.fungames.sniper3d
      iTunes Store Link: https://itunes.apple.com/us/app/sniper-3d-assassin-fps-battle/id930574573?mt=8&uo=4&at=1010lce4



      Hack Features:
      - Infinite Coins
      - Infinite Gems
      - Infinite Energy
      - Infinite Ammo / No Reload
      - No Spread


      Jailbreak required hack(s):  https://iosgods.com/topic/74123-arm64-sniper-3d-fps-battle-shoot-to-kill-2018-v2180-jailed-cheats-5/
        • Winner
        • Like
      • 2,317 replies
    • SUPERSTAR THEBLACKLABEL v1.0.4 Jailed Cheats +3
      Modded/Hacked App: SUPERSTAR THEBLACKLABEL By Dalcomsoft Inc.
      Bundle ID: com.dalcomsoft.ssbl
      App Store Link: https://apps.apple.com/us/app/superstar-theblacklabel/id6738368827?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

      - Auto Dance
      - Never Lose Combo
      - Always S.Perfect

       

      Jailbroken Hack: https://iosgods.com/topic/208618-superstar-theblacklabel-cheats-auto-update-3/


      ⬇️ iOS Hack Download IPA Link: https://iosgods.com/topic/208617-superstar-theblacklabel-v104-jailed-cheats-3/
      • 0 replies
    • June’s Journey: Hidden Objects Cheats v4.1.3 +2
      Modded/Hacked App: June’s Journey: Hidden Objects By wooga gmbh
      Bundle ID: net.wooga.junes-journey-hidden-object-mystery-game
      iTunes Store Link: https://apps.apple.com/us/app/junes-journey-hidden-objects/id1200391796?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - Infinite Currencies
      - Instant Hint


      iOS Hack Download Link: https://iosgods.com/topic/176105-june%E2%80%99s-journey-hidden-objects-cheats-v3534-2/
      • 77 replies
    • Lily's Garden (Auto Update) Jailed Cheats +4
      Modded/Hacked App: Lily’s Garden: Design & Match By Tactile Games ApS
      Bundle ID: dk.tactile.lilysgarden
      iTunes Store Link: https://apps.apple.com/us/app/lilys-garden-design-match/id1437783446?uo=4


      Hack Features:
      - Freeze Moves
      - Freeze Life
      - Freeze Boosters
      - Freeze Coins and Stars


      Jailbreak required hack(s): https://iosgods.com/topic/90985-lilys-garden-cheats-all-versions-5/


      Hack Download Link: https://iosgods.com/topic/90987-lilys-garden-v21021-jailed-cheats-4/
      • 111 replies
    • Chef & Friends: Cooking Game Cheats v1.42.1 +1
      Modded/Hacked App: Chef & Friends: Cooking Game By MYTONA Ltd.
      Bundle ID: com.mytona.cheftales
      iTunes Store Link: https://apps.apple.com/us/app/chef-friends-cooking-game/id1586951898?uo=4


      Hack Features:
      - Infinite Currencies (Hats, Coins, Gems)

      NOTE: May bug out the game so better try on your throw away account first 


      iOS Hack Download Link: https://iosgods.com/topic/178904-chef-friends-cooking-game-cheats-v141-1/
      • 43 replies
    • The Seven Deadly Sins v2.99.1 Jailed Cheats +5
      Modded/Hacked App: The Seven Deadly Sins By Netmarble Corporation
      Bundle ID: com.netmarble.nanagb
      App Store Link: https://apps.apple.com/us/app/the-seven-deadly-sins/id1475440231?uo=4

       


      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - God Mode
      - One Hit Kill
      - Multiply Attack
      - Multiply Defense
      - Auto Win
      - Make Enemies God Mode for some quests



      iOS Hack Download IPA Link: https://iosgods.com/topic/185121-the-seven-deadly-sins-v2920-jailed-cheats-5/
      • 304 replies
    • Avabel Online -Tower of Bonds- v12.6.5 Jailed Cheats +7
      Modded/Hacked App: Avabel Online -Tower of Bonds- By ASOBIMO,Inc.
      Bundle ID: com.asobimo.AvabelOnline
      iTunes Store Link: https://apps.apple.com/us/app/avabel-online-tower-of-bonds/id606800657?uo=4


      Mod Requirements:
      - Non-Jailbroken/Jailed or Jailbroken iPhone/iPad/iPod Touch.
      - Sideloadly / Cydia Impactor or alternatives.
      - A Computer Running Windows/macOS/Linux with iTunes installed.


      Hack Features:
      - Collision Range - x1 - 10
      - God Mode 
      - Cast Speed Multiplier
      - Charge Speed Multiplier
      - Approach Speed Multiplier
      - No Roll CoolDown
      - No Skills CoolDown

      NOTE: DO NOT BUY VIP FOR JUST THIS CHEAT. THIS IS A TEST VERSION


      iOS Hack Download IPA Link: https://iosgods.com/topic/187184-avabel-online-tower-of-bonds-v1230-jailed-cheats-7/
      • 147 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