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

    • Subnautica v1.21.82617 +100++ Jailed Cheats [ Developer Menu ]
      Modded/Hacked App: Subnautica By Unknown Worlds Entertainment, Inc.
      Bundle ID: com.UnknownWorlds.Subnautica
      App Store Link: https://apps.apple.com/us/app/subnautica/id6478639011?uo=4

       
       

      🤩 Hack Features

      - Developer Menu -> Pause the game and you will see a Developer Menu button.

      For all developer commands, go here.
      • 1 reply
    • Subnautica v1.21.82617 +100++ Cheats [ Developer Menu ]
      Modded/Hacked App: Subnautica By Unknown Worlds Entertainment, Inc.
      Bundle ID: com.UnknownWorlds.Subnautica
      App Store Link: https://apps.apple.com/us/app/subnautica/id6478639011?uo=4

       


      🤩 Hack Features

      - Developer Menu -> Pause the game and you will see a Developer Menu button.

      For all developer commands, go here..
      • 3 replies
    • Dawn of Ages: Medieval Games v2.0.8 +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
      • 10 replies
    • Dawn of Ages: Medieval Games v2.0.8 +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

       

      📌 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

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
      - Dumb Enemy
      - Premium Enabled

       

      ⬇️ iOS Hack Download Link


      Hidden Content

      Download Hack







       

      📖 iOS Installation Instructions

      STEP 1: Download the .deb hack file from the link above. Use Safari, Google Chrome or other iOS browsers to download.
      STEP 2: Once the file has downloaded, tap on it and then you will be prompted on whether you want to open the deb with iGameGod or copy it to Filza.
      STEP 3: If needed, tap on the downloaded file again, then select ‘Normal Install’ from the options on your screen.
      STEP 4: Let iGameGod/Filza finish the cheat installation. If it doesn’t install successfully, see the note below.
      STEP 5: Open the game, log in to your iOSGods account when asked, then toggle on the features you want and enjoy!

       

      NOTE: If you have any questions or problems, read our Jailbreak iOS Hack Troubleshooting & Frequently Asked Questions & Answers topic. If you still haven't found a solution, post your issue below and we'll do our best to help! If the hack does work for you, please post your feedback below and help out other fellow members that are encountering issues.

       

      🙌 Credits

      - @Puddin
      - @Laxus

       

      📷 Cheat Video/Screenshots

      N/A

       

      More iOS App Hacks
      If you’re looking for Non-Jailbroken & No Jailbreak required iOS IPA hacks, visit the iOS Game Cheats & Hacks or the iOSGods App for a variety of modded games and apps for non-jailbroken iOS devices.

      Modded Android APKs
      Need modded apps or games for Android? Check out the latest custom APK mods, cheats & more in our Android Section.
      • 18 replies
    • Pocket Fighter! v0.9.1 [+2 Jailed Cheats]
      Modded/Hacked App: Pocket Fighter! By LATTE GAMES JOINT STOCK COMPANY
      Bundle ID: com.hsa.games.pocketfighter
      App Store Link: https://apps.apple.com/us/app/pocket-fighter/id6466782630?uo=4



      🤩 Hack Features

      - Unlimited Currency (Always Will Increase)
      - Enemy Can't Attack

      • 1 reply
    • Pocket Fighter! v0.9.1 [+2 Cheats]
      Modded/Hacked App: Pocket Fighter! By LATTE GAMES JOINT STOCK COMPANY
      Bundle ID: com.hsa.games.pocketfighter
      App Store Link: https://apps.apple.com/us/app/pocket-fighter/id6466782630?uo=4



      🤩 Hack Features

      - Unlimited Currency (Always Will Increase)
      - Enemy Can't Attack
       
      • 1 reply
    • Final Outpost v2.3.20 [+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
      • 21 replies
    • Final Outpost v2.3.20 [+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
      • 16 replies
    • Z Survivor: Backpack Shooter v0.65 [+2 Cheats]
      Modded/Hacked App: Z Survivor: Backpack Shooter By Tapped Ltd
      Bundle ID: com.tapped.zsurvivor
      iTunes Store Link: https://apps.apple.com/us/app/z-survivor-backpack-shooter/id6557072922?uo=4



      🤩 Hack Features

      - Debug Menu (Auto Play, Skip Level and more)
      - Never Die
      - Unlimited Resource (Currency, Keys, Blueprints)
      • 15 replies
    • Z Survivor: Backpack Shooter v0.65 [+2 Jailed Cheats]
      Modded/Hacked App: Z Survivor: Backpack Shooter By Tapped Ltd
      Bundle ID: com.tapped.zsurvivor
      iTunes Store Link: https://apps.apple.com/us/app/z-survivor-backpack-shooter/id6557072922?uo=4



      🤩 Hack Features

      - Debug Menu (Auto Play, Skip Level and more)
      - Never Die
      - Unlimited Resource (Currency, Keys, Blueprints)
      • 15 replies
    • Run! Goddess v1.0.23 [+4 Jailed Cheats]
      Modded/Hacked App: Run! Goddess By TOP GAMES INC.
      Bundle ID: com.topgamesinc.rg
      iTunes Store Link: https://apps.apple.com/us/app/run-goddess/id6667111749?uo=4



      🤩 Hack Features

      - No Skill Cooldown
      - Slow Enemy
      - Enemy Can't Attack (Enemy Can't Do Damage)
      • 107 replies
    • Run! Goddess v1.0.23 [+4 Cheats]
      Modded/Hacked App: Run! Goddess By TOP GAMES INC.
      Bundle ID: com.topgamesinc.rg
      iTunes Store Link: https://apps.apple.com/us/app/run-goddess/id6667111749?uo=4

       

      🤩 Hack Features

      - No Skill Cooldown
      - Slow Enemy
      - Enemy Can't Attack (Enemy Can't Do Damage)
       
      • 82 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