Jump to content

Errors compiling Tweak.xm


Go to solution Solved by Todeskuss,

37 posts in this topic

Recommended Posts

Posted

(y)

Yikes man we got yet another issue. Switches in Settings aren't doing anything.

 

Tweak.xm:

 

 


#define PLIST_PATH @"/var/mobile/Library/Preferences/prefbundle.plist"
 
inline bool GetPrefBool(NSString *key)
{
return [[[NSDictionary dictionaryWithContentsOfFile:PLIST_PATH] valueForKey:key] boolValue];
}



%hook PlayerData
-(void) setVetoVoteCast:(bool) veto {
if(GetPrefBool(@"kMap")) {
veto=true;
}
%orig(veto);
}

-(bool) vetoVoteCast {
if(GetPrefBool(@"kMap")) {
 return true;
}
return %orig;
}
%end

%hook MultiplayerController
-(void) setIsPregameVeto: (bool)veto {
if(GetPrefBool(@"kMap")) {
veto=false;
}
return %orig;
}

-(bool) isHost {
if(GetPrefBool(@"kMap")) {
 return true;
}
return %orig;
}
%end



%hook Hat
-(BOOL) unlocked {
if(GetPrefBool(@"kUnlock")) {
 return TRUE;
}
return %orig;
}

-(void) setUnlocked: (BOOL)hat {
if(GetPrefBool(@"kUnlock")) {
hat=TRUE;
}
%orig(hat);
}
%end

%hook Color
-(BOOL) unlocked {
if(GetPrefBool(@"kUnlock")) {
 return TRUE;
}
return %orig;
}

-(void) setUnlocked: (BOOL)color {
if(GetPrefBool(@"kUnlock")) {
color=TRUE;
}
%orig(color);
}
%end

%hook Character
-(BOOL) unlocked {
if(GetPrefBool(@"kUnlock")) {
 return TRUE;
}
return %orig;
}

-(void) setUnlocked: (BOOL)character {
if(GetPrefBool(@"kUnlock")) {
character=TRUE;
}
%orig(character);
}
%end

%hook Trail
-(BOOL) unlocked {
if(GetPrefBool(@"kUnlock")) {
 return TRUE;
}
return %orig;
}

-(void) setUnlocked: (BOOL)trail {
if(GetPrefBool(@"kUnlock")) {
trail=TRUE;
}
%orig(trail);
}
%end

%hook UserDataManager
-(BOOL) isPowerupUnlocked {
if(GetPrefBool(@"kUnlock")) {
return TRUE;
}
return %orig;
}

-(BOOL) isHatUnlocked {
if(GetPrefBool(@"kUnlock")) {
return TRUE;
}
return %orig;
}

-(BOOL) isCharacterUnlocked {
if(GetPrefBool(@"kUnlock")) {
return TRUE;
}
return %orig;
}

-(BOOL) isTrailUnlocked {
if(GetPrefBool(@"kUnlock")) {
return TRUE;
}
return %orig;
}
%end

%hook LocalUserData
-(BOOL) isPowerupUnlocked {
if(GetPrefBool(@"kUnlock")) {
return TRUE;
}
return %orig;
}

-(BOOL) isHatUnlocked {
if(GetPrefBool(@"kUnlock")) {
return TRUE;
}
return %orig;
}

-(BOOL) isCharacterUnlocked {
if(GetPrefBool(@"kUnlock")) {
return TRUE;
}
return %orig;
}

-(BOOL) isTrailUnlocked {
if(GetPrefBool(@"kUnlock")) {
return TRUE;
}
return %orig;
}
%end



%hook Player
-(bool) isOnGreen {
if(GetPrefBool(@"kGreen")) {
 return false;
}
return %orig;
}

-(bool) hasHitGreen {
if(GetPrefBool(@"kGreen")) {
 return false;
}
return %orig;
}
%end

%hook PlayerUpdateData 
-(bool) isOnGreen {
if(GetPrefBool(@"kGreen")) {
 return false;
}
return %orig;
}
%end




%hook WaterSprite
-(unsigned int) receiveContactEvent {
if(GetPrefBool(@"kWater")) {
return 0;
}
return %orig;
}
%end



%hook SandTrapSprite
-(unsigned int) receiveContactEvent {
if(GetPrefBool(@"kSand")) {
return 0;
}
return %orig;
}
%end



%hook LaserSprite
-(unsigned int) receiveContactEvent {
if(GetPrefBool(@"kLaser")) {
return 0;
}
return %orig;
}
%end



%hook  DynamicBox
-(unsigned int) receiveContactEvent {
if(GetPrefBool(@"kSaws")) {
return 0;
}
return %orig;
}
%end



%hook BoundsSprite
-(unsigned int) receiveContactEvent {
if(GetPrefBool(@"kBounds")) {
return 0;
}
return %orig;
}
%end



%hook TerrainObject
-(unsigned int) receiveContactEvent {
if(GetPrefBool(@"kAcidSticky")) {
return 0;
}
return %orig;
}
%end



%hook AppDelegate

-(void)applicationDidBecomeActive:(id)arg { 

UIAlertView *credits = [[UIAlertView alloc] initWithTitle:@"Flappy Golf Cheats" 
                                                  message:@"Hacked by Fumetsu for iOSGods.com" 
                                                 delegate:self 
                                        cancelButtonTitle:@"Thanks!" 
                                        otherButtonTitles:@"Visit Us", nil]; 
[credits show];
[credits release]; 
return %orig();
}
 
%new
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
 
NSString *button = [alertView buttonTitleAtIndex:buttonIndex];
 
        if([button isEqualToString:@"Visit Us"])
        {
                [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.iOSGods.com/"]];                                                                                
        }
}
%end

 

 

 

any other files you need to see just let me know

Posted

@@fumetsu

 

Check your "prefbundle.plist". Is that how it's named?

 

do you have the correct bundle ID also?

Posted (edited)

@@fumetsu

 

Check your "prefbundle.plist". Is that how it's named?

 

do you have the correct bundle ID also?

The bundle ID under 'defaults'? It was the bundle ID of prefbundle, that didn't work; I changed it to the bundle ID of the tweak itself, that didn't work either. Then I changed it to the bundle ID of the application, and that just broke it. Updated by Fumetsu
Posted (edited)

goto /var/mobile/library/preferences

find prefbundle.plist 

toggle the switches a few time and try again

Updated by imp0ss1ble
Posted

The bundle ID under 'defaults'? It was the bundle ID of prefbundle, that didn't work; I changed it to the bundle ID of the tweak itself, that didn't work either. Then I changed it to the bundle ID of the application, and that just broke it.

Under 'defaults' needs to be the bundle ID of the tweak itself.

 

Under 'key' needs to be the same key you set in your tweak.xm which by the way is not a patcher. It' just a simple tweak.

 

If you're having issues or need a bit of guidance, I suggest you use this template: http://iosgods.com/topic/1907-update2template-custom-nic-patcherpreferencebundle-template/

Posted

Under 'defaults' needs to be the bundle ID of the tweak itself.

 

Under 'key' needs to be the same key you set in your tweak.xm which by the way is not a patcher. It' just a simple tweak.

 

If you're having issues or need a bit of guidance, I suggest you use this template: http://iosgods.com/topic/1907-update2template-custom-nic-patcherpreferencebundle-template/

I'm not dumb, I know what Key needs to be defined as, as well as under defaults. The problem was in #include, I had it listed as 'prefbundle.plist' instead of 'com.fumetsu.prefbundle.plist'. Anyway I have yet another issue. The toggles work fine, but only for some. The other ones which originally had the '(?)' that you questioned don't work. Is it supposed to stay as '(unsigned int)'? Am I missing something since it's written as 'receiveContactEvent:(?)' even though the (?) gives errors?

Posted

I'm not dumb, I know what Key needs to be defined as, as well as under defaults. The problem was in #include, I had it listed as 'prefbundle.plist' instead of 'com.fumetsu.prefbundle.plist'. Anyway I have yet another issue. The toggles work fine, but only for some. The other ones which originally had the '(?)' that you questioned don't work. Is it supposed to stay as '(unsigned int)'? Am I missing something since it's written as 'receiveContactEvent:(?)' even though the (?) gives errors?

Anyone?

Posted

Anyone?

Show a picture on a method like that on flex.

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

    • Temple Run 2 Cheats v1.123.0 +8
      Modded/Hacked App: Temple Run 2 by Imangi Studios, LLC
      Bundle ID: com.imangi.templerun2
      iTunes Store Link: https://apps.apple.com/us/app/temple-run-2/id572395608?uo=4&at=1010lce4


      Hack Features:
      - No Ads Enabled
      - x2 Coin Enabled
      - Infinite Coin (Spend some)
      - Infinite Gem (Spend some)
      - All Characters Unlocked
      - Free iAP (Turn off all iap hacks before using this, also if itunes popup don't show then run ldrestart in terminal -- This is an issue with the jailbreak not the hack)
      - Auto Run
      - Coin Magnet


      iOS Hack Download Link: https://iosgods.com/topic/132609-arm64-temple-run-2-cheats-v1691-8/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 310 replies
    • Cats & Soup Cheats v2.73.0 +2
      Modded/Hacked App: Cats & Soup By HIDEA Co.,Ltd
      Bundle ID: com.hidea.cat
      iTunes Store Link: https://apps.apple.com/us/app/cats-soup/id1581431235?uo=4

       

      📌 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Sileo, Cydia or Zebra).

       

      🤩 Hack Features

      - Infinite Currencies
      - Unlocked All Specials and No Ads

       

      Non-Jailbroken Hack: https://iosgods.com/topic/157486-cats-soup-v2630-jailed-cheats-2/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/157484-cats-soup-cheats-v2640-2/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 307 replies
    • Battle Legion - Mass Battler Cheats v4.4.0 +4
      Modded/Hacked App: Battle Legion - Mass Battler By GODSPEED GAMING SOLUTIONS PRIVATE LIMITED
      Bundle ID: com.traplight.battleslides
      iTunes Store Link: https://apps.apple.com/us/app/battle-legion-mass-battler/id1435133042?uo=4

       

      📌 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Sileo, Cydia or Zebra).

       

      🤩 Hack Features

      - Multiply Attack
      - Multiply Defense
      - Instant Win
      - Enemies Don't Move
      - Enemies Don't Attack

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/129669-battle-legion-mass-battler-cheats-v424-4/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 577 replies
    • AdVenture Capitalist Cheats v9.12.1 +1
      Modded/Hacked App: AdVenture Capitalist By Hyper Hippo Publishing Ltd.
      Bundle ID: com.kongregate.mobile.adventurecapitalist
      iTunes Store Link: https://apps.apple.com/us/app/adventure-capitalist/id927006017?uo=4


      Hack Features:
      - Freeze Currencies

       
      Free Non-Jailbroken Hack:  https://iosgods.com/topic/82751-adventure-capitalist-v940-jailed-cheats-1/


      Hack Download Link: https://iosgods.com/topic/78370-adventure-capitalist-cheats-v940-1/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,191 replies
    • Eternium Cheats v1.38.52 +11
      Modded/Hacked App: Eternium By Making Fun, Inc.
      Bundle ID: com.makingfun.mageandminions
      iTunes Store Link: https://apps.apple.com/us/app/eternium/id579931356?uo=4

       

      📌 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Sileo, Cydia or Zebra).

       

      🤩 Hack Features

      - 5K Gems When Completed Stage
      - Infinite Gold
      - Infinite Cosmetic
      - Infinite Yellow Stone
      - Multiply Attack (Linked with Enemy)
      - No Skills Cooldown
      - No Consumable Cooldown
      - Multiply Attack Speed
      - Instant Regen Health
      - Always Crit
      - Material Drops (When you killed an Enemy it will drop materials for crafts)



      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/194526-eternium-cheats-v13355-6/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 90 replies
    • EA SPORTS FC™ (FIFA) MOBILE SOCCER Cheats v25.9.08 +2
      Modded/Hacked App: FIFA Soccer By Electronic Arts
      Bundle ID: com.ea.ios.fifamobile
      iTunes Store Link: https://itunes.apple.com/us/app/fifa-soccer/id1094930513

      Hack Features:
      - Keeper on drugs 
      - stupid AI defense (randomly works lol but funny as hell)
      - EASY WINS BECAUSE OF ABOVE 
       


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,194 replies
    • ProgressBar95 - retro arcade v1.8000 Jailed Cheats +2
      Modded/Hacked App: ProgressBar95 - retro arcade By Spooky House Studios UG (haftungsbeschraenkt)
      Bundle ID: com.spookyhousestudios.progressbar95
      iTunes Store Link: https://apps.apple.com/us/app/progressbar95-retro-arcade/id1474374114?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

      - Free iAP (Turn on from iOSGods Menu first)
      - iGameGod Added

       

      ⬇️ iOS Hack Download IPA Link: https://iosgods.com/topic/192629-progressbar95-retro-arcade-v16000-jailed-cheats-2/
        • Informative
        • Haha
        • Winner
        • Like
      • 6 replies
    • Gangstar Vegas Cheats v8.5.1 +4
      Modded/Hacked App: Gangstar Vegas - Mafia action By Gameloft
      Bundle ID: com.gameloft.gangstar4
      iTunes Store Link: https://apps.apple.com/us/app/gangstar-vegas-mafia-action/id571393580?uo=4

       

      📌 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Cydia, Sileo or Zebra).

       

      🤩 Hack Features

      - Infinite Currencies
      - Infinite Run ( To stop running turn off in menu then click run again )
      - Infinite Ammo / No Reload ( Required re-launching the game after purchasing new gun and enabled in menu before load into the game )
      - No Cops


      NOTE: Turn off wifi before playing


      🍏 For Non-Jailbroken & No Jailbreak required hacks: https://iosgods.com/topic/166702-gangstar-vegas-mafia-action-v791-jailed-cheats-3/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/147734-gangstar-vegas-cheats-v800-4/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 1,013 replies
    • Idle Army: Trading Weapons v1.15.0 [+5 Jailed Cheats]
      Modded/Hacked App: Idle Army: Trading Weapons By UNIMOB VIET NAM COMPANY LIMITED
      Bundle ID: com.unimob.idle.army
      App Store Link: https://apps.apple.com/us/app/idle-army-trading-weapons/id6670773625?uo=4



      🤩 Hack Features

      - Always Enough Resources (Gem, Skip Ads etc.)
      - Max Gold (Enable inside game)
      - 2x Game Speed (Enable inside game)
      - Kill Monster (Enable inside game)
      - Add All Pet

        • Haha
        • Thanks
        • Winner
        • Like
      • 23 replies
    • Idle Army: Trading Weapons v1.15.0 [+5 Cheats]
      Modded/Hacked App: Idle Army: Trading Weapons By UNIMOB VIET NAM COMPANY LIMITED
      Bundle ID: com.unimob.idle.army
      App Store Link: https://apps.apple.com/us/app/idle-army-trading-weapons/id6670773625?uo=4

       

      🤩 Hack Features

      - Always Enough Resources (Gem, Skip Ads etc.)
      - Max Gold (Enable inside game)
      - 2x Game Speed (Enable inside game)
      - Kill Monster (Enable inside game)
      - Add All Pet

        • Agree
        • Thanks
        • Winner
        • Like
      • 7 replies
    • Apocalypse Worm: Zombie Strike v0.3.1 [+2 Jailed Cheats]
      Modded/Hacked App: Apocalypse Worm: Zombie Strike By A Thinking Ape Entertainment Ltd.
      Bundle ID: ata.strike.worm.zombie.apocalypse
      iTunes Store Link: https://apps.apple.com/us/app/apocalypse-worm-zombie-strike/id6740106898?uo=4
       

      🤩 Hack Features

      - Never Die
      - Unlimited Resources (Earn Some)
        • Like
      • 13 replies
    • Apocalypse Worm: Zombie Strike v0.3.1 [+2 Cheats]
      Modded/Hacked App: Apocalypse Worm: Zombie Strike By A Thinking Ape Entertainment Ltd.
      Bundle ID: ata.strike.worm.zombie.apocalypse
      iTunes Store Link: https://apps.apple.com/us/app/apocalypse-worm-zombie-strike/id6740106898?uo=4



      🤩 Hack Features

      - Never Die
      - Unlimited Resources (Earn Some)
       
      • 8 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