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

    • Village Tales v0.2.1 [ +1 Cheats ] Currency Max
      Modded/Hacked App: Village Tales By Texas PFCG Aplicativos Ltda
      Bundle ID: com.city.urbi
      App Store Link: https://apps.apple.com/ph/app/storm-tale-2/id1575085199?uo=4


      🤩 Hack Features

      - Gems

      • 0 replies
    • Village Tales v0.2.1 [ +1 Jailed ] Currency Max
      Modded/Hacked App: Village Tales By Texas PFCG Aplicativos Ltda
      Bundle ID: com.city.urbi
      App Store Link: https://apps.apple.com/us/app/storm-tale-2/id1575085199?uo=4


      🤩 Hack Features

      - Gems

      • 0 replies
    • Sago Mini World: Kids Games Modded v8.3.1536 +1
      Modded/Hacked App: Sago Mini World By Sago Mini
      Bundle ID: com.sagosago.Friends
      iTunes Store Link: https://itunes.apple.com/us/app/sago-mini-world/id874425722?mt=8&uo=4&at=1010lce4



      Hack Features:
      - PREMIUM


      Hack Download Link: https://iosgods.com/topic/77893-arm64-sago-mini-world-modded-v31-1/


      Credits:
      - @Laxus
      • 206 replies
    • Summoners War: Rush v1.7.30715 Jailed Cheats +4
      Modded/Hacked App: Summoners War: Rush By Com2uS Corp.
      Bundle ID: com.com2us.legion.ios.apple.global.normal
      App Store Link: https://apps.apple.com/us/app/summoners-war-rush/id6476949737?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
      - Weak Enemies
      - Multiply ATK Speed
      - Multiply MOVE Speed

       

      DO NOT BUY VIP FOR THIS CHEAT AND DON'T EXPECT THIS CAN BE UPDATED

       

      ⬇️ iOS Hack Download IPA Link: https://iosgods.com/topic/196105-summoners-war-rush-v1425709-jailed-cheats-4/
      • 101 replies
    • SimCity BuildIt Cheats v1.68.1 +1 [ Freeze Currencies ]
      Modded/Hacked App: SimCity BuildIt By EA Swiss Sarl
      Bundle ID: com.ea.simcitymobile.bv
      iTunes Store Link: https://apps.apple.com/us/app/simcity-buildit/id913292932?uo=4


      Hack Features:
      - Infinite Currencies


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/124792-arm64-simcity-buildit-v1412-jailed-cheats-1/


      iOS Hack Download Link: https://iosgods.com/topic/157687-simcity-buildit-cheats-v1415-1/
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 682 replies
    • Barbie Dreamhouse Adventures Cheats v2025.6.0 +1
      Modded/Hacked App: Barbie Dreamhouse Adventures By Budge Studios
      Bundle ID: com.budgestudios.BarbieDreamhouse
      iTunes Store Link: https://apps.apple.com/us/app/barbie-dreamhouse-adventures/id1296796112?uo=4


      Hack Features:
      - PREMIUM


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/150378-barbie-dreamhouse-adventures-v202180-jailed-cheats-1/


      iOS Hack Download Link: https://iosgods.com/topic/150377-barbie-dreamhouse-adventures-cheats-v202180-1/
        • Like
      • 80 replies
    • Fallout Shelter Online Cheats v5.10.6 +4
      Modded/Hacked App: Fallout Shelter Online By SHENGQU TECHNOLOGY HOLDINGS HK LIMITED
      Bundle ID: com.gaea.sdg.shelter
      iTunes Store Link: https://apps.apple.com/ph/app/fallout-shelter-online/id1476237088?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

      - Multiply Attack
      - God Mode
      - Dumb Enemies
      - No Radiation

      USE AT YOUR OWN RISK


      🍏 For Non-Jailbroken & No Jailbreak required hacks: https://iosgods.com/topic/191961-fallout-shelter-online-v599-jailed-cheats-4/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/191960-fallout-shelter-online-cheats-v599-4/
      • 39 replies
    • Alien Invasion: RPG Idle Space Cheats v4.22.00 +2
      Modded/Hacked App: Alien Invasion: RPG Idle Space By MULTICAST GAMES LIMITED
      Bundle ID: com.multicastgames.venomSurvive
      iTunes Store Link: https://apps.apple.com/us/app/alien-invasion-rpg-idle-space/id6443697602?uo=4


      Hack Features:
      - Infinite Currencies


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/topic/167591-alien-invasion-rpg-idle-space-v204-jailed-cheats-1/


      iOS Hack Download Link: https://iosgods.com/topic/167589-alien-invasion-rpg-idle-space-cheats-v204-1/
        • Haha
        • Like
      • 422 replies
    • Idle MoonRabbit: AFK RPG Cheats v1.125.0 +4
      Modded/Hacked App: Idle MoonRabbit: AFK RPG By Able Games Co. ,Ltd.
      Bundle ID: com.TheAbleGames.DalToKi
      iTunes Store Link: https://apps.apple.com/us/app/idle-moonrabbit-afk-rpg/id1599684924?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

      - Multiply Attack
      - Multiply Defense
      - Infinite Mana
      - Instant Skills


      🍏 For Non-Jailbroken & No Jailbreak required hacks: https://iosgods.com/topic/190116-idle-moonrabbit-afk-rpg-v11130-jailed-cheats-4/

       

      📥 iOS Hack Download Link: https://iosgods.com/topic/167497-idle-moonrabbit-afk-rpg-cheats-v11130-4/
      • 244 replies
    • Subway Surfers Cheats v3.51.0 +5
      Modded/Hacked App: Subway Surfers By Sybo Games ApS
      Bundle ID: com.kiloo.subwaysurfers
      iTunes Store Link: https://apps.apple.com/us/app/subway-surfers/id512939461?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

      - Free Store (not Free iAP)
      - Free iAP (ViP Only)
      - Unlock Characters Outfit
      - Custom Jump Height
      - No Clip (To end level swipe to left til you get dizzy, swipe again and you will lose)

       

      Non-Jailbroken Hack: https://iosgods.com/topic/119795-subway-surfers-v3425-jailed-cheats-5/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/119793-subway-surfers-cheats-v3430-5/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 2,346 replies
    • PewDiePie's Tuber Simulator Cheats v2.58.0 +3
      Modded/Hacked App: PewDiePie's Tuber Simulator By Outerminds Inc.
      Bundle ID: com.outerminds.tubular
      iTunes Store Link: https://apps.apple.com/us/app/pewdiepies-tuber-simulator/id1093190533?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 Subscriber
      - Infinite Views
      - Infinite Bux

      NOTE: Please complete tutorial first before enabling the hacks otherwise it won't work

      NOTe 2: Please make a youtube video to get some views first (without hack) then before enable infinite views

       

      Non-Jailbroken Hack: https://iosgods.com/topic/86411-pewdiepies-tuber-simulator-v2450-jailed-cheats-3/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/86366-pewdiepies-tuber-simulator-cheats-v2460-3/
        • Agree
        • Haha
        • Winner
        • Like
      • 1,157 replies
    • Travel Town - Merge Adventure v2.12.1190 Jailed Cheats +1
      Modded/Hacked App: Travel Town - Merge Adventure By Magmatic Games Ltd
      Bundle ID: io.randomco.travel
      iTunes Store Link: https://apps.apple.com/us/app/travel-town-merge-adventure/id1521236603?uo=4


      Hack Features:
      - Infinite Currencies


      iOS Hack Download Link: https://iosgods.com/topic/148953-travel-town-merge-adventure-v212287-jailed-cheats-1/
        • Informative
        • Agree
        • Like
      • 802 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