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

    • Merge Magic Academy v1.7.0 [ +3 Cheats ] Currency Max
      Modded/Hacked App: Merge Magic Academy By ZYMobile
      Bundle ID: com.zymobile.magic.merge.ios
      App Store Link: https://apps.apple.com/us/app/merge-magic-academy/id6746467003?uo=4


      🤩 Hack Features

      - Gems
      - Energy
      - Stars
      • 1 reply
    • Merge Magic Academy v1.7.0 [ +3 Jailed ] Currency Max
      Modded/Hacked App: Merge Magic Academy By ZYMobile
      Bundle ID: com.zymobile.magic.merge.ios
      App Store Link: https://apps.apple.com/us/app/merge-magic-academy/id6746467003?uo=4
       

      🤩 Hack Features

      - Gems
      - Energy
      - Stars
      • 1 reply
    • Loot Heroes v1.8.0 +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
      • 118 replies
    • Loot Heroes v1.8.0 +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
      • 270 replies
    • Fisherman 2 v1.03.11 [+6 Jailed Cheats]
      Modded/Hacked App: Fisherman 2 By Little Star Games Oy
      Bundle ID: com.littlestargames.fm2
      App Store Link: https://apps.apple.com/us/app/fisherman-2/id6446778412?uo=4



      🤩 Hack Features

      - Add Coins (Enable inside main menu and enter game)
      - Add Diamonds (Enable inside main menu and enter game)
      - Catch 50 Fish (Enable inside game)
      - Complete All Task (Enable inside main menu)
      - Update All Task (Enable inside main menu)
      - End Current Round (Enable inside game)
      • 3 replies
    • Fisherman 2 v1.03.11 [+6 Cheats]
      Modded/Hacked App: Fisherman 2 By Little Star Games Oy
      Bundle ID: com.littlestargames.fm2
      App Store Link: https://apps.apple.com/us/app/fisherman-2/id6446778412?uo=4



      🤩 Hack Features

      - Add Coins (Enable inside main menu and enter game)
      - Add Diamonds (Enable inside main menu and enter game)
      - Catch 50 Fish (Enable inside game)
      - Complete All Task (Enable inside main menu)
      - Update All Task (Enable inside main menu)
      - End Current Round (Enable inside game)
      • 0 replies
    • Tasty Travels: Merge Game v33.0 +3 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Tasty Travels: Merge Game By Century Games Pte. Ltd.
      Bundle ID: com.fatmerge.global
      iTunes Store Link: https://apps.apple.com/us/app/tasty-travels-merge-game/id6471045672?uo=4

       


      🤩 Hack Features

      - Unlimited Currencies -> Will increase instead of decrease.
      - Unlimited Energy -> Will increase instead of decrease.
      • 14 replies
    • Tasty Travels: Merge Game v33.0 +3 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Tasty Travels: Merge Game By Century Games Pte. Ltd.
      Bundle ID: com.fatmerge.global
      iTunes Store Link: https://apps.apple.com/us/app/tasty-travels-merge-game/id6471045672?uo=4

       


      🤩 Hack Features

      - Unlimited Currencies -> Will increase instead of decrease.
      - Unlimited Energy -> Will increase instead of decrease.
      • 14 replies
    • Endless Wander - Roguelike RPG v2.4.28 [+3 Jailed Cheats]
      Modded/Hacked App: Endless Wander - Roguelike RPG By First Pick Studios
      Bundle ID: com.FirstPickStudios.Endless-Wander
      App Store Link: https://apps.apple.com/us/app/endless-wander-roguelike-rpg/id6473157705?uo=4



      🤩 Hack Features

      - Never Die
      - Always Enough Currency
      - Unlimited Currency (Will Always Increase)
      • 16 replies
    • Endless Wander - Roguelike RPG v2.4.28 [+3 Cheats]
      Modded/Hacked App: Endless Wander - Roguelike RPG By First Pick Studios
      Bundle ID: com.FirstPickStudios.Endless-Wander
      App Store Link: https://apps.apple.com/us/app/endless-wander-roguelike-rpg/id6473157705?uo=4



      🤩 Hack Features

      - Never Die
      - Always Enough Currency
      - Unlimited Currency (Will Always Increase)
       
      • 13 replies
    • Zombies Clicker v20.1.8 [+4 Jailed Cheats]
      Modded/Hacked App: Zombies Clicker By EDENAP d.o.o.
      Bundle ID: com.edenap.a3
      App Store Link: https://apps.apple.com/us/app/zombies-clicker/id6746955704?uo=4


      🤩 Hack Features

      - Add Currency
      - Add Prestige
      - Never Die
      - One Hit Kill
      • 1 reply
    • Zombies Clicker v20.1.8 [+4 Cheats]
      Modded/Hacked App: Zombies Clicker By EDENAP d.o.o.
      Bundle ID: com.edenap.a3
      App Store Link: https://apps.apple.com/us/app/zombies-clicker/id6746955704?uo=4



      🤩 Hack Features

      - Add Currency
      - Add Prestige
      - Never Die
      - One Hit Kill
      • 3 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