Jump to content

11 posts in this topic

Recommended Posts

Posted

I'm making a hack with preference bundle and I keep getting the error when compiling : %end doesn't make sense inside a block.

 

tweak.xm:

#import <UIKit/UIKit.h>
#import <substrate.h>
#import <Foundation/Foundation.h>

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

%hook Coins
-(int)have {
if(GetPrefBool(@"key1")) {
return 987654321;
}
return %orig;
}
%end

%hook Coins
-(int)spent { 
if(GetPrefBool(@"key2")) {
return 0;
}
return %orig;
}
%end

%hook Coins
-(int)cheated {
if(GetPrefBool(@"key3")) {
return 0;
}
return %orig;
}
%end

%hook State
-(int)setLevel {
if(GetPrefBool(@"key4")) {
return 270;
}
return %orig;
}
%end

%hook State
-(void)setHungry:(bool)argument {
if(GetPrefBool(@"key5")) {
argument = false;
}
return %orig;
}
%end

%hook AppDelegate
-(BOOL)application:(id)fp8 didFinishLaunchingWithOptions:(id)fp12 {
UIAlertView *credits = [[UIAlertView alloc] initWithTitle:@"Pou Cheats!"
message:@"Made by Sunny Patel" 
delegate:self
cancelButtonTitle:@"Thanks"
otherButtonTitles:@"Subscribe to My Channel!", nil]; 
[credits show];
[credits release]; 
%orig();
}

%new
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
NSString *button = [alertView buttonTitleAtIndex:buttonIndex];
if([button isEqualToString:@"Subscribe to My Channel!"])
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.youtube.com/StarSunSunny"]]; 
}
%end

 

plist for preference bundle:

<?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>A Lot of Coins</string>
        </dict>
        <dict>
            <key>cell</key>
            <string>PSSwitchCell</string>
            <key>default</key>
            <false/>
            <key>defaults</key>
            <string>com.sunny.poucheats</string>
            <key>key</key>
            <string>key1</string>
            <key>label</key>
            <string>ManyCoins</string>
        </dict>
        <dict>
            <key>cell</key>
            <string>PSGroupCell</string>
            <key>footerText</key>
            <string>No Coins Spent</string>
        </dict>
        <dict>
            <key>cell</key>
            <string>PSSwitchCell</string>
            <key>default</key>
            <false/>
            <key>defaults</key>
            <string>com.sunny.poucheats</string>
            <key>key</key>
            <string>key2</string>
            <key>label</key>
            <string>NoSpendingCoins</string>
        </dict>
        <dict>
            <key>cell</key>
            <string>PSGroupCell</string>
            <key>footerText</key>
            <string>No Cheat Detection MUST BE TURNED ON!!!!!!</string>
        </dict>
        <dict>
            <key>cell</key>
            <string>PSSwitchCell</string>
            <key>default</key>
            <false/>
            <key>defaults</key>
            <string>com.sunny.poucheats</string>
            <key>key</key>
            <string>key3</string>
            <key>label</key>
            <string>NoCheatDetection</string>
        </dict>
        <dict>
            <key>cell</key>
            <string>PSGroupCell</string>
            <key>footerText</key>
            <string>High Level</string>
        </dict>
        <dict>
            <key>cell</key>
            <string>PSSwitchCell</string>
            <key>default</key>
            <false/>
            <key>defaults</key>
            <string>com.sunny.poucheats</string>
            <key>key</key>
            <string>key4</string>
            <key>label</key>
            <string>HighLevel</string>
        </dict>
        <dict>
            <key>cell</key>
            <string>PSGroupCell</string>
            <key>footerText</key>
            <string>Pou is Not Hungry</string>
        </dict>
        <dict>
            <key>cell</key>
            <string>PSSwitchCell</string>
            <key>default</key>
            <false/>
            <key>defaults</key>
            <string>com.sunny.poucheats</string>
            <key>key</key>
            <string>key5</string>
            <key>label</key>
            <string>PouNotHungry</string>
        </dict>
        <dict>
            <key>cell</key>
            <string>PSGroupCell</string>
        </dict>
        <dict>
            <key>cell</key>
            <string>PSTextCell</string>
            <key>label</key>
            <string>Made by Sunny Patel.</string>
        </dict>
        <dict>
            <key>action</key>
            <string>link</string>
            <key>cell</key>
            <string>PSButtonCell</string>
            <key>icon</key>
            <string>[email protected]</string>
            <key>label</key>
            <string>Subscribe to My Channel!</string>
        </dict>
    </array>
    <key>title</key>
    <string>Pou Cheats</string>
</dict>
</plist>

 

 

Posted (edited)

In your %new section you have 2 beginnings "{", but only one end "}"

Its expecting a 2nd "}" before the %end I believe.

Im driving while reading this so hope that helps narrow down the problem.

Edit:

%new
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
NSString *button = [alertView buttonTitleAtIndex:buttonIndex];
if([button isEqualToString:@"Subscribe to My Channel!"])
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.youtube.com/StarSunSunny"]]; 
}
	}  //You're missing this
%end
	

Updated by i0s_tweak3r
Showing fixed code
Posted

@HxR I think you're missing a " } " 

Try this

%new
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
NSString *button = [alertView buttonTitleAtIndex:buttonIndex];
if([button isEqualToString:@"Subscribe to My Channel!"])
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.youtube.com/StarSunSunny"]]; 
}
	}
%end

Posted
6 hours ago, i0s_tweak3r said:

In your %new section you have 2 beginnings "{", but only one end "}"

Its expecting a 2nd "}" before the %end I believe.

Im driving while reading this so hope that helps narrow down the problem.

Edit:

 


%new
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
NSString *button = [alertView buttonTitleAtIndex:buttonIndex];
if([button isEqualToString:@"Subscribe to My Channel!"])
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.youtube.com/StarSunSunny"]]; 
}
	}  //You're missing this
%end
	

 

:facepalm: you just copied me

Posted
6 hours ago, i0s_tweak3r said:

In your %new section you have 2 beginnings "{", but only one end "}"

Its expecting a 2nd "}" before the %end I believe.

Im driving while reading this so hope that helps narrow down the problem.

Edit:

 


%new
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
NSString *button = [alertView buttonTitleAtIndex:buttonIndex];
if([button isEqualToString:@"Subscribe to My Channel!"])
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.youtube.com/StarSunSunny"]]; 
}
	}  //You're missing this
%end
	

 

 

Stop Copying @KFCzZz , I will sue you :rofl: 

Posted
2 minutes ago, KFCzZz said:

:facepalm: you just copied me

Lmao I was gonna say the same.... But you posted after I hit "Edit" but b4 I saved.  Your code just copied what I said b4 the edit tho. ?

4 minutes ago, TheArmKing said:

Stop Copying @KFCzZz , I will sue you :rofl: 

Im sueing both of you! I was first darn it.  And I spotted the error at 80 mph at a glance haha.  

Posted
3 minutes ago, i0s_tweak3r said:

Lmao I was gonna say the same.... But you posted after I hit "Edit" but b4 I saved.  Your code just copied what I said b4 the edit tho. ?

Im sueing both of you! I was first darn it.  And I spotted the error at 80 mph at a glance haha.  

 

Ok , lets bring it on to the court case , we have substantial prove your post was edited :troll: which makes you in the red light 

Posted (edited)
42 minutes ago, TheArmKing said:

Ok , lets bring it on to the court case , we have substantial prove your post was edited :troll: which makes you in the red light 

I'm sure this fancy new BB format has timestamps of time that "Edit" was hit and time "Submit Reply" was hit. 

Nothing was edited, the code was added. My post b4 the edit still spelled out pretty clearly what and where the error was.   Besides- mine had the pretty "// this is what you're missing", making it original content. ?

Let me be right for once, lol.  :badass:

 

 

Updated by i0s_tweak3r

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

    • Magic Defense TD v296 [ +5 Cheats ] Always Win
      Modded/Hacked App: Magic Defense! By OBLIQUE GAMES, Corp.
      Bundle ID: com.ObliqueGames.MagicTowerDefense100
      iTunes Store Link: https://apps.apple.com/us/app/magic-defense/id6475539174?uo=4


      Hack Features:
      - No ADS [ Rewards Free ]

      - Skill Cooldown

      - Damage

      - Never Die

      - Auto Kill Enemy + Freez  [ Always Win ]


      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/
      • 74 replies
    • Magic Defense TD v296 [ +5 Jailed ] Always Win
      Modded/Hacked App: Magic Defense : TD By OBLIQUE GAMES, Corp.
      Bundle ID: com.ObliqueGames.MagicTowerDefense100
      iTunes Store Link: https://apps.apple.com/us/app/magic-defense-td/id6475539174?uo=4



      Hack Features:

      - No ADS [ Rewards Free ]

      - Skill Cooldown

      - Damage

      - Never Die

      - Auto Kill Enemy + Freez  [ Always Win ]


      Jailbreak required hack(s): https://iosgods.com/forum/5-game-cheats-hack-requests/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Agree
      • 47 replies
    • Heroes vs. Hordes: Survivor v5.1.3 [ +11 Cheats ] Currency Max
      Modded/Hacked App: Heroes vs. Hordes: Survivor By Swift Games GmbH
      Bundle ID: com.swiftgames.roguelikesurvival
      iTunes Store Link: https://apps.apple.com/us/app/heroes-vs-hordes-survivor/id1608898173?uo=4

       
      Hack Features

      - Currency

      - Resource

      - Gold Unlimited [ Bonus Wave ]

      - Ch Unlocked [ Play All Off ]

      - Always Last Wave

      - Talents Cost 0

      - Hero DMG Only

      - HP & DMG [ Just Equip & Unequip ]

      - Enemy Freeze

      - Enemy ATK NO

       
      For Non-Jailbroken & No Jailbreak required hacks: https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
        • Like
      • 70 replies
    • Heroes vs. Hordes: Survivor v5.1.3 [ +11 Jailed ] Currency Max
      Modded/Hacked App: Heroes vs. Hordes: Survivor By Swift Games GmbH
      Bundle ID: com.swiftgames.roguelikesurvival
      iTunes Store Link: https://apps.apple.com/us/app/heroes-vs-hordes-survivor/id1608898173?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

      - Currency

      - Resource

      - Gold Unlimited [ Bonus Wave ]

      - Ch Unlocked [ Play All Off ]

      - Always Last Wave

      - Talents Cost 0

      - Hero DMG Only

      - HP & DMG [ Just Equip & Unequip ]

      - Enemy Freeze

      - Enemy ATK NO


      Jailbreak required iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      Modded Android APKs: https://iosgods.com/forum/68-android-section/

       

      iOS Hack Download IPA Link


      Hidden Content

      Download via the iOSGods App
      • 85 replies
    • Merge & Blast: Dream Island v2.22.1 [ +2 Cheats ] Auto Win
      Modded/Hacked App: Merge & Blast: Dream Island By Dreamo, Inc.
      Bundle ID: com.dreamo.woodyblast
      iTunes Store Link: https://apps.apple.com/us/app/merge-blast-dream-island/id1668748189?uo=4


      🤩 Hack Features

      - Auto Win
      - Coin + Moves [ Disable After Get ]




      🍏 For Non-Jailbroken & No Jailbreak required hacks: https://iosgods.com/forum/79-no-jailbreak-section/
      🤖 Modded Android APKs: https://iosgods.com/forum/68-android-section/
      • 13 replies
    • Merge & Blast: Dream Island v2.22.1 [ +2 Jailed ] Auto Win
      Modded/Hacked App: Merge & Blast: Dream Island By Dreamo, Inc.
      Bundle ID: com.dreamo.woodyblast
      iTunes Store Link: https://apps.apple.com/us/app/merge-blast-dream-island/id1668748189?uo=4

       

      🤩 Hack Features

      - Auto Win
      - Coin + Moves [ Disable After Get ]




      🍏 Jailbreak iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      🤖 Modded Android APKs: https://iosgods.com/forum/68-android-section/
      • 18 replies
    • Merge Cruise: Mystery Puzzle v0.36.360 [ +2 Cheats ] Currency Max
      Modded/Hacked App: Merge Cruise: Mystery Puzzle By STUDIO PEERPLAY GAMES LTD
      Bundle ID: com.peerplay.megamerge
      iTunes Store Link: https://apps.apple.com/us/app/merge-cruise-mystery-puzzle/id6459056553?uo=4
       

      🤩 Hack Features

      - Cash
      - Energy

      • 13 replies
    • Merge Cruise: Mystery Puzzle v0.36.360 [ +2 Jailed ] Currency Max
      Modded/Hacked App: Merge Cruise: Mystery Puzzle By STUDIO PEERPLAY GAMES LTD
      Bundle ID: com.peerplay.megamerge
      iTunes Store Link: https://apps.apple.com/us/app/merge-cruise-mystery-puzzle/id6459056553?uo=4
       

      🤩 Hack Features

      - Cash
      - Energy

      • 17 replies
    • Pop Island v1.0.8 [ +1 Cheats ] Coins Max
      Modded/Hacked App: Pop Island By HISTAR INTERACTIVE PTE. LTD.
      Bundle ID: com.hmbdgames.match
      iTunes Store Link: https://apps.apple.com/us/app/pop-island/id6505047210?uo=4


      🤩 Hack Features

      - Coins [ Win Match Disable After Hack ]


      • 13 replies
    • Pop Island v1.0.8 [ +1 Jailed ] Coins Max
      Modded/Hacked App: Pop Island By HISTAR INTERACTIVE PTE. LTD.
      Bundle ID: com.hmbdgames.match
      iTunes Store Link: https://apps.apple.com/us/app/pop-island/id6505047210?uo=4


      🤩 Hack Features

      - Coins [ Win Match Disable After Hack ]


      • 12 replies
    • Survivor Kingdoms V3.23 [ +11 Cheats ] Easy Win
      Modded/Hacked App: Survivor Kingdoms By Gamee Joint Stock Company
      Bundle ID: com.gamee.kingdoms.survivor.io
      iTunes Store Link: https://apps.apple.com/us/app/survivor-kingdoms/id6444824577?uo=4


      Hack Features:
      - IAP Free [ Buy Anything ]

      - Health

      - Damage

      - Skill CD Slow

      - Skill CD Fast [ Maybe Game Slow ]

      - Skill Size Big

      - Shooting Speed Fast

      - Movement Speed

      - Auto Revive Unlimited [ Never Die ]

      - Ultimate Power CD

      - Avatar & Frame 


      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/
      • 41 replies
    • Survivor Kingdoms V3.23 [ +11 Jailed ] Easy Win
      Modded/Hacked App: Survivor Kingdoms By Gamee Joint Stock Company
      Bundle ID: com.gamee.kingdoms.survivor.io
      iTunes Store Link: https://apps.apple.com/us/app/survivor-kingdoms/id6444824577?uo=4

       

      🚀 Hack Features

      - IAP Free [ Buy Anything ]

      - Health

      - Damage

      - Skill CD Slow

      - Skill CD Fast [ Maybe Game Slow ]

      - Skill Size Big

      - Shooting Speed Fast

      - Movement Speed

      - Auto Revive Unlimited [ Never Die ]

      - Ultimate Power CD

      - Avatar & Frame 


      🍏 Jailbreak iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      🤖 Modded Android APKs: https://iosgods.com/forum/68-android-section/
      • 26 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