Jump to content

Preference Bundle Error


Go to solution Solved by Crypto,

24 posts in this topic

Recommended Posts

Posted

I keep getting this I don't know how to fix it

 

Tweak.xm:18:4: error: use of undeclared identifier

'GetPrefBool'

if(GetPrefBool(@"kPlan")) {

^

1 error generated.

make[2]: *** [obj/Tweak.xm.af20312e.o] Error 1

make[1]: *** [internal-library-all_] Error 2

make: *** [magicPiano.all.tweak.variables] Error 2

iPhone:/var/mobile/magicpiano root#

 

THIS IS THE LINE IN THE TWEAK.XM

 

%hook MagicSubscriptionPlan

-(int) period {

if(GetPrefBool(@"kPlan")) {

return 999999999;

}

return %orig;

}

%end

  • Solution
Posted

I'm not 100% sure but try this and don't forget to change the plist name to your preference bundle folder name

 

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

 

inline bool GetPrefBool(NSString *key)

{

return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];

}

 

%hook MagicSubscriptionPlan

-(int) period {

if(GetPrefBool(@"kPlan")) {

return 999999999;

}

return %orig;

}

%end

Posted

I'm not 100% sure but try this and don't forget to change the plist name to your preference bundle folder name

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

inline bool GetPrefBool(NSString *key)

{

return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];

}

%hook MagicSubscriptionPlan

-(int) period {

if(GetPrefBool(@"kPlan")) {

return 999999999;

}

return %orig;

}

%end

Do I paste The whole thing into Tweak.xm ?
Posted

Do I paste The whole thing into Tweak.xm ?

Yeah but change the PREFERENCEBUNDLENAME.plist to your pref bundle name with the .plist

Posted

Add this at the top:

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

@Patricktph worked?

Yea, but I have a question what if I want to add it to more switches

@Patricktph worked?

Yes but I still have one question if I want to make more than 1 switching an just add this if(GetPrefBool(@"kPlan")) { before return then and add the %orig;

Posted

Add this at the top:

 

inline bool GetPrefBool(NSString *key) {
return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}
I got the hack switch in my settings but when I turn it on or off it doesn't do anything in the app but Normaly with out the switch for on and off it works..

 

THIS IS MY TWEAK.xm

 

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

 

inline bool GetPrefBool(NSString *key)

{

return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];

}

 

%hook MagicPerformanceStats

-(bool) isPerfect {

if(GetPrefBool(@"kPlan")) {

return true;

}

return %orig;

}

%end

AND THIS IS MY 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>items</key>

<array>

<dict>

<key>cell</key>

<string>PSGroupCell</string>

<key>footerText</key>

<string>Magic Piano</string>

</dict>

<dict>

<key>cell</key>

<string>PSSwitchCell</string>

<key>default</key>

<true/>

<key>defaults</key>

<string>com.techprohacker.ptest</string>

<key>key</key>

<string>kPlan</string>

<key>label</key>

<string>VIP ACCESS</string>

</dict>

</array>

<key>title</key>

<string>ptest</string>

</dict>

</plist>

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

    • Loot Heroes v1.6.9 +10 Jailed Cheats [ Unlimited Currencies ]
      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 Currencies
      - God Mode -> Traps still cause damage.
      - One-Hit Kill
      - All Heroes Unlocked
      - All Skins Unlocked
      - No Skill Cooldown
      - No Ads

      VIP
      - Unlimited Currencies -> Earn some.
      - Auto Win
      - Battle Pass Unlocked
      • 114 replies
    • Loot Heroes v1.6.9 +10 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Loot Heroes By BoomBit, Inc.
      Bundle ID: com.bbp.lootheroes
      iTunes Store Link: https://apps.apple.com/us/app/loot-heroes/id6642699678?uo=4


      Hack Features:
      - Freeze Currencies
      - God Mode -> Traps still cause damage.
      - One-Hit Kill
      - All Heroes Unlocked
      - All Skins Unlocked
      - No Skill Cooldown
      - No Ads

      VIP
      - Unlimited Currencies -> Earn some.
      - Auto Win
      - Battle Pass Unlocked
      • 256 replies
    • Nightfall: Kingdom Frontier TD v1.0.404 +8 Jailed Cheats [ Currencies ]
      Modded/Hacked App: Nightfall: Kingdom Frontier TD By Fansipan Limited
      Bundle ID: com.fansipan.nightfall.tower.simulation.strategy.td.game
      iTunes Store Link: https://apps.apple.com/us/app/nightfall-kingdom-frontier-td/id6621272416?uo=4


      Hack Features:
      - God Mode
      - Unlimited In-Game Coins -> Will increase instead of decrease.
      - Unlimited Currencies -> Will increase instead of decrease.
      - No Ads
      - Add 1K Currency -> Head over to Settings and toggle the Discord button. [ VIP ]
      - Unlock All Features -> Head over to Settings and toggle the Discord button. [ VIP ]
      - Unlock All / Everything ->  Head over to Settings and toggle the Discord button. [ VIP ]
      - Complete Tutorial -> Head over to Settings and toggle the Discord button. [ VIP ]


      Jailbreak required hack(s): [Mod Menu Hack] Nightfall: Kingdom Frontier TD v1.0.41 +8 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/
      • 95 replies
    • Dawn of Ages: Medieval Games v2.0.5 +5 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Dawn of Ages: total war battle By BoomBit, Inc.
      Bundle ID: com.stratospheregames.dawnofages
      App Store Link: https://apps.apple.com/us/app/dawn-of-ages-total-war-battle/id6477473268?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Dumb Enemy
      - Premium Enabled
      • 54 replies
    • Dawn of Ages: Medieval Games v2.0.5 +5 Cheats [ Damage & Defence ]
      Modded/Hacked App: Dawn of Ages: total war battle By BoomBit, Inc.
      Bundle ID: com.stratospheregames.dawnofages
      App Store Link: https://apps.apple.com/us/app/dawn-of-ages-total-war-battle/id6477473268?uo=4

       
       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Dumb Enemy
      - Premium Enabled
      • 32 replies
    • Goblins Wood: Tycoon Idle Sim v2.49.1 +1++ Jailed Cheat [ Unlimited Currencies ]
      Modded/Hacked App: Goblins Wood: Tycoon Idle Sim By ProGamesLab LTD
      Bundle ID: idle.goblins.wood.tycoon
      iTunes Store Link: https://apps.apple.com/us/app/goblins-wood-tycoon-idle-sim/id6446766326?uo=4


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


      Jailbreak required hack(s): [Mod Menu Hack] Goblins Wood: Tycoon Idle Sim v2.42.0 +1++ Cheat [ 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/
      • 26 replies
    • Goblins Wood: Tycoon Idle Sim v2.49.1 +1++ Cheat [ Unlimited Currencies ]
      Modded/Hacked App: Goblins Wood: Tycoon Idle Sim By ProGamesLab LTD
      Bundle ID: idle.goblins.wood.tycoon
      iTunes Store Link: https://apps.apple.com/us/app/goblins-wood-tycoon-idle-sim/id6446766326?uo=4


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


      Non-Jailbroken & No Jailbreak required hack(s): [IPA Mod Menu] Goblins Wood: Tycoon Idle Sim v2.42.0 +1++ Jailed Cheat [ Unlimited Currencies ] - Free Non-Jailbroken IPA 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/
      • 33 replies
    • Nightfall: Kingdom Frontier TD v1.0.404 +8 Cheats [ Currencies ]
      Modded/Hacked App: Nightfall: Kingdom Frontier TD By Fansipan Limited
      Bundle ID: com.fansipan.nightfall.tower.simulation.strategy.td.game
      iTunes Store Link: https://apps.apple.com/us/app/nightfall-kingdom-frontier-td/id6621272416?uo=4


      Hack Features:
      - God Mode
      - Unlimited In-Game Coins -> Will increase instead of decrease.
      - Unlimited Currencies -> Will increase instead of decrease.
      - No Ads
      - Add 1K Currency -> Head over to Settings and toggle the Discord button. [ VIP ]
      - Unlock All Features -> Head over to Settings and toggle the Discord button. [ VIP ]
      - Unlock All / Everything ->  Head over to Settings and toggle the Discord button. [ VIP ]
      - Complete Tutorial -> Head over to Settings and toggle the Discord button. [ VIP ]


      Non-Jailbroken & No Jailbreak required hack(s): [IPA Mod Menu] Nightfall: Kingdom Frontier TD v1.0.41 +8 Jailed Cheats [ Unlimited Currencies ] - Free Non-Jailbroken IPA 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/
      • 106 replies
    • Hitman: Blood Money — Reprisal v1.3 +5++ Jailed Cheats [ Cheats Menu ]
      Modded/Hacked App: Hitman: Blood Money — Reprisal By Feral Interactive Ltd
      Bundle ID: com.feralinteractive.hitmanbloodmoney-ios
      App Store Link: https://apps.apple.com/us/app/hitman-blood-money-reprisal/id1631331207?uo=4

       


      🤩 Hack Features

      - Freeze Ammo
      - Freeze Reserve Ammo
      - Insane Fire Rate
      - Unlimited Cash -> Earn or spend some.
      - Cheats Menu -> Pause in-game and scroll to the bottom. See picture below for more!

      Full Game unlock isn't possible. I've tried, trust me. Either pay or not, it's up to you.
      • 0 replies
    • Hitman: Blood Money — Reprisal v1.3 +5++ Cheats [ Cheats Menu ]
      Modded/Hacked App: Hitman: Blood Money — Reprisal By Feral Interactive Ltd
      Bundle ID: com.feralinteractive.hitmanbloodmoney-ios
      App Store Link: https://apps.apple.com/us/app/hitman-blood-money-reprisal/id1631331207?uo=4

       
       

      🤩 Hack Features

      - Freeze Ammo
      - Freeze Reserve Ammo
      - Insane Fire Rate
      - Unlimited Cash -> Earn or spend some.
      - Cheats Menu -> Pause in-game and scroll to the bottom. See picture below for more!

      Full Game unlock isn't possible. I've tried, trust me. Either pay or not, it's up to you.
      • 0 replies
    • Final Outpost v2.3.18 [+3 Jailed Cheats]
      Modded/Hacked App: Final Outpost By Exabyte Games Ltd
      Bundle ID: com.samclothier.DEADfense
      iTunes Store Link: https://apps.apple.com/us/app/final-outpost/id1425444801?uo=4



      🤩 Hack Features

      -  Always Enough Resources
      -  Always Attain Skill
      -  No Food Consume
      • 18 replies
    • Final Outpost v2.3.18 [+3 Cheats]
      Modded/Hacked App: Final Outpost By Exabyte Games Ltd
      Bundle ID: com.samclothier.DEADfense
      iTunes Store Link: https://apps.apple.com/us/app/final-outpost/id1425444801?uo=4

       

      🤩 Hack Features

      -  Always Enough Resources
      -  Always Attain Skill
      -  No Food Consume
      • 14 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