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>

Posted

Tried turning it on and off? The switch. :p

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

    • Backpack Legends Adventure RPG v0.4.5 [ +12 Cheats ] Currency Max
      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

      - Enough Currency
      - Enough Resources
      - Freeze Currency
      - Freeze Resources
      :::::: VIP ::::::
      - ADS NO
      - Unlimited Currency
      - Unlimited Resources
      - Inventory Slot MAX
      Weapon Stats
      - ATK MAX
      - HP MAX
      - DEF MAX
      - Speed MAX
      - Items Bonus / Linked Weapon Stats
      • 1 reply
    • Backpack Legends Adventure RPG v0.4.5 [ +12 Cheats ] Currency Max
      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

      - Enough Currency
      - Enough Resources
      - Freeze Currency
      - Freeze Resources
      :::::: VIP ::::::
      - ADS NO
      - Unlimited Currency
      - Unlimited Resources
      - Inventory Slot MAX
      Weapon Stats
      - ATK MAX
      - HP MAX
      - DEF MAX
      - Speed MAX
      - Items Bonus / Linked Weapon Stats
      • 1 reply
    • Backpack Legends Adventure RPG v0.4.5 [ +12 Jailed ] Currency Max
      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

      - Enough Currency
      - Enough Resources
      - Freeze Currency
      - Freeze Resources
      :::::: VIP ::::::
      - ADS NO
      - Unlimited Currency
      - Unlimited Resources
      - Inventory Slot MAX
      Weapon Stats
      - ATK MAX
      - HP MAX
      - DEF MAX
      - Speed MAX
      - Items Bonus / Linked Weapon Stats
      • 0 replies
    • Sword of Convallaria v2.1.1 Jailed Cheats +5
      Modded/Hacked App: Sword of Convallaria By XD Entertainment Pte Ltd
      Bundle ID: com.xd.ssrpgen
      App Store Link: https://apps.apple.com/us/app/sword-of-convallaria/id6451019582?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
      - One Hit Kill 
      - Multiply Attack
      - Instant Skills
      - Unlimited Backtrack

       

      ⬇️ iOS Hack Download IPA Link: https://iosgods.com/topic/214320-sword-of-convallaria-v211-jailed-cheats-5/
      • 1 reply
    • Monster Walk: Survive v0.0.5 [ +9 Cheats ] Currency Max
      Modded/Hacked App: Monster Walk: Survive By Talofa Corporation
      Bundle ID: com.talofagames.survive
      App Store Link: https://apps.apple.com/us/app/monster-walk-survive/id6759917111?uo=4

      🤩 Hack Features

      - Unlimited Gems
      - Unlimited Coins
      - Unlimited Energy
      - Unlimited Ticket
      - Unlimited HP Token
      - Unlimited Booster +4
      - Bullet ATK
      - Skill ATK
      - Skill CD
      • 0 replies
    • Monster Walk: Survive v0.0.5 [ +9 Jailed ] Currency Max
      Modded/Hacked App: Monster Walk: Survive By Talofa Corporation
      Bundle ID: com.talofagames.survive
      App Store Link: https://apps.apple.com/us/app/monster-walk-survive/id6759917111?uo=4

      🤩 Hack Features

      - Unlimited Gems
      - Unlimited Coins
      - Unlimited Energy
      - Unlimited Ticket
      - Unlimited HP Token
      - Unlimited Booster +4
      - Bullet ATK
      - Skill ATK
      - Skill CD
      • 0 replies
    • Idle RPG: Lone Necromancer +2 Mods [ Damage + More ]
      Mod APK Game Name: Idle RPG: Lone Necromancer By LUNOSOFT INC
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.lunosoft.nhn

       

      🤩 Hack Features

      - Damage Multiplier
      - God Mode
      • 0 replies
    • The Lone Necromancer: Idle RPG +2 Jailed Cheats [ Damage + More ]
      Modded/Hacked App: The Lone Necromancer: Idle RPG By Lunosoft Inc.
      Bundle ID: com.lunosoft.nhnios
      App Store Link: https://apps.apple.com/us/app/the-lone-necromancer-idle-rpg/id6738776756?uo=4

       

      🤩 Hack Features

      - Damage Multiplier
      - God Mode
      • 2 replies
    • Lamar - Idle Vlogger +3 Mods [ Unlimited Currencies ]
      Mod APK Game Name: Lamar - Idle Vlogger By CrazyLabs LTD
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.advant.streamer

       

      🤩 Hack Features

      - Unlimited Cash -> Will increase instead of decrease.
      - Unlimited Gold -> Spend some.
      - Unlimited Ad Skip Tickets -> Spend some.
      • 3 replies
    • Town Matters - Match Hero +3 Mods [ Unlimited Coins ]
      Mod APK Game Name: Town Matters - Match Hero By 707 INTERACTIVE: Fun Epic Casual Games
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=machinist.enigma.match3free.android

       

      🤩 Hack Features

      - Unlimited Coins -> Complete a level.
      - Unlimited Moves -> Will not decrease.
      - Auto Win
      • 0 replies
    • Town Matters-Match Hero +3 Jailed Cheats [ Unlimited Coins ]
      Modded/Hacked App: Town Matters-Match Hero By Joyient Inc.
      Bundle ID: machinist.enigma.match3free.ios
      iTunes Store Link: https://apps.apple.com/us/app/town-matters-match-hero/id1472473722?uo=4


      Hack Features:
      - Unlimited Coins -> Complete a level.
      - Unlimited Moves -> Will not decrease.


      Jailbreak required hack(s): [Mod Menu Hack] Town Matters-Match Hero v1.5.5 +3 Cheats [ Unlimited Coins ] - 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/
      • 23 replies
    • Love & Pies - Merge Mystery +8 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Love & Pies - Merge Mystery By Trailmix Ltd
      Bundle ID: com.Trailmix.LoveAndPiesMerge
      App Store Link: https://apps.apple.com/us/app/love-pies-merge-mystery/id1563239332?uo=4

       
       

      🤩 Hack Features

      - Unlimited Coins
      - Unlimited Gems
      - Unlimited Energy
      - Unlimited Stars
      - Complete Order
      - Complete All Orders
      - Clear Blockers
      - Unlock All Storage Slots
      • 56 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