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

    • Pal Go: Tower Defense TD v0.3.73 [+7 Cheats]
      Modded/Hacked App: Pal Go: Tower Defense TD By Playwind Ltd
      Bundle ID: com.playwindgames.freedefender
      iTunes Store Link: https://apps.apple.com/us/app/pal-go-tower-defense-td/id6479316663?uo=4


       

      🚀 Hack Features

      - [VIP] Freeze Currency (Currency will not decrease when used)

      - [VIP] Currency Always Enough (Buy even when you don't have enough currency)

      - [Free] Higher Recruit Energy (Gives 500 Recruit Energy Every Wave)

      - [Free] Always Can Drag Hero

      - [Free] Skip Ads

      - [Free] No Attack Cooldown

      - [Free] Global Speed Multiplier (Enable Inside Battle)

       

      Warning


      Do not use on main account. There is a chance of ban. Not responsible for any bans.

       


      🍏 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/
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 46 replies
    • Pal Go: Tower Defense TD v0.3.73 [+7 Jailed Cheats]
      Modded/Hacked App: Pal Go: Tower Defense TD By Playwind Ltd
      Bundle ID: com.playwindgames.freedefender
      iTunes Store Link: https://apps.apple.com/us/app/pal-go-tower-defense-td/id6479316663?uo=4


       

      Hack Features

      - [VIP] Freeze Currency (Currency will not decrease when used)

      - [VIP] Currency Always Enough (Buy even when you don't have enough currency)

      - [Free] Higher Recruit Energy (Gives 500 Recruit Energy Every Wave)

      - [Free] Always Can Drag Hero

      - [Free] Skip Ads

      - [Free] No Attack Cooldown

      - [Free] Global Speed Multiplier (Enable Inside Battle)

       

      Warning


      Do not use on main account. There is a chance of ban. Not responsible for any bans.

       

      Jailbreak required iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      Modded Android APKs: https://iosgods.com/forum/68-android-section/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 71 replies
    • Derailed: Survival Adventure v1.8.0 [+3 Jailed Cheats]
      Modded/Hacked App: Derailed: Survival Adventure By Kwalee Ltd
      Bundle ID: com.kwalee.derailed
      iTunes Store Link: https://apps.apple.com/us/app/derailed-survival-adventure/id6670252580?uo=4



      🤩 Hack Features

      - Free Shop (IAP, No Ads, Chest)
      - Never Die
      - Always Can Unlock Tiles
        • Agree
        • Winner
        • Like
      • 8 replies
    • Derailed: Survival Adventure v1.8.0 [+3 Cheats]
      Modded/Hacked App: Derailed: Survival Adventure By Kwalee Ltd
      Bundle ID: com.kwalee.derailed
      iTunes Store Link: https://apps.apple.com/us/app/derailed-survival-adventure/id6670252580?uo=4

       

      🤩 Hack Features

      - Free Shop (IAP, No Ads, Chest)
      - Never Die
      - Always Can Unlock Tiles
        • Haha
        • Like
      • 7 replies
    • Life in Adventure v1.2.30 [+3 Jailed Cheats]
      Modded/Hacked App: Life in Adventure By sangil kim
      Bundle ID: com.StudioWheel.Bard
      iTunes Store Link: https://apps.apple.com/us/app/life-in-adventure/id1551617649?uo=4



      🚀 Hack Features

      - Add Gems (Do not Add More Than 900. If your Gem > 1000 You'll get ban)
      - Guild Subscription Activeted
      - Never Die
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 17 replies
    • Life in Adventure v1.2.30 [+3 Cheats]
      Modded/Hacked App: Life in Adventure By sangil kim
      Bundle ID: com.StudioWheel.Bard
      App Store Link: https://apps.apple.com/us/app/life-in-adventure/id1551617649?uo=4



      🤩 Hack Features

      - Add Gems (Do not Add More Than 900. If your Gem > 1000 You'll get ban)
      - Guild Subscription Activeted
      - Never Die
        • Thanks
        • Like
      • 6 replies
    • Bounce Defense v1.3.5 [+5 Jailed Cheats]
      Modded/Hacked App: Bounce Defense By Voodoo
      Bundle ID: com.minigamelab.bouncedefense
      App Store Link: https://apps.apple.com/us/app/bounce-defense/id6740627201?uo=4



      🤩 Hack Features

      - Add Currency
      - Add Battle Currency (Enable inside battle)
      - Never Die
      - Unlock All Towers
      - Unlimited Tower Cards
        • Like
      • 11 replies
    • Bounce Defense v1.3.5 [+5 Cheats]
      Modded/Hacked App: Bounce Defense By Voodoo
      Bundle ID: com.minigamelab.bouncedefense
      App Store Link: https://apps.apple.com/us/app/bounce-defense/id6740627201?uo=4



      🤩 Hack Features

      - Add Currency
      - Add Battle Currency (Enable inside battle)
      - Never Die
      - Unlock All Towers
      - Unlimited Tower Cards
        • Like
      • 8 replies
    • Galaxy Defense: Fortress TD v0.8.9 [+2 Cheats]
      Modded/Hacked App: Galaxy Defense: Fortress TD By CYBERJOY LIMITED
      Bundle ID: com.cyberjoy.galaxydefense
      App Store Link: https://apps.apple.com/us/app/galaxy-defense-fortress-td/id6740189002?uo=4



      🤩 Hack Features

      - One Hit Kill
      - Activate SVIP
       
        • Agree
        • Winner
        • Like
      • 25 replies
    • Galaxy Defense: Fortress TD v0.8.9 [+2 Jailed Cheats]
      Modded/Hacked App: Galaxy Defense: Fortress TD By CYBERJOY LIMITED
      Bundle ID: com.cyberjoy.galaxydefense
      App Store Link: https://apps.apple.com/us/app/galaxy-defense-fortress-td/id6740189002?uo=4



      🤩 Hack Features

      - One Hit Kill
      - Activate SVIP
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 5 replies
    • Run! Goddess v1.0.17 [+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)
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 76 replies
    • Run! Goddess v1.0.17 [+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)
       
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 68 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