Skip to content
Guest Big Announcement

How to hook a boolean with an argument?

Featured Replies

Solved by Rook

  • Replies 34
  • Views 5.8k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • - (BOOL)canLikeWithTime:(double)fp8 {         return true(9999); }   Instead fp8 you can write what you want. This is just the way I do it (and Apple). The first function variable which is BOOL here

  • #import <UIKit/UIKit.h> %hook LikeTaskDB - (BOOL)canLikeWithTime:(double)fp8 { return TRUE; fp8 = 9999; } %end %hook AppDelegate -(void)applicationDidBecomeActive:(id)argument { U

  • mehdiphone
    mehdiphone

    You guys good teachers

 

- (BOOL)canLikeWithTime:(double)fp8 {   
     return true(9999);
}

 

Instead fp8 you can write what you want. This is just the way I do it (and Apple). The first function variable which is BOOL here always comes first. Put the arguments in brackets.

  • Author

Wait it should be return true;9999;* castilx made a mistake didnt he?

It tells me expected a ";" after true and when i put it another error appears with the 9999 they tell me to put "~~~~" :weed:

Updated by mehdiphone

  • Author

#import <UIKit/UIKit.h>

%hook LikeTaskDB

 

-(BOOL)canLikeWithTime:(double)fp8 {

%orig(true, 9999);

}

%end

 

%hook AppDelegate

-(void)applicationDidBecomeActive:(id)argument {

UIAlertView *alert = [[uIAlertView alloc] initWithTitle:@"Swag hack" message:@"Hacked by mehdi visit more at ios gods.com" delegate:nil cancelButtonTitle:@"Thanx" otherButtonTitles:nil];

[alert show];

[alert release];

}

%end

  • Solution

#import <UIKit/UIKit.h>

%hook LikeTaskDB

 

-(BOOL)canLikeWithTime:(double)fp8 {

%orig(true, 9999);

}

%end

 

%hook AppDelegate

-(void)applicationDidBecomeActive:(id)argument {

UIAlertView *alert = [[uIAlertView alloc] initWithTitle:@"Swag hack" message:@"Hacked by mehdi visit more at ios gods.com" delegate:nil cancelButtonTitle:@"Thanx" otherButtonTitles:nil];

[alert show];

[alert release];

}

%end

#import <UIKit/UIKit.h>

%hook LikeTaskDB
- (BOOL)canLikeWithTime:(double)fp8 {   
     return TRUE;
     fp8 = 9999;
}
%end

%hook AppDelegate
-(void)applicationDidBecomeActive:(id)argument {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Swag hack" message:@"Hacked by mehdi visit more at iosgods.com" delegate:nil cancelButtonTitle:@"Thanx" otherButtonTitles:nil];
[alert show];
[alert release];
}
%end 

Create an account or sign in to comment

Featured Content

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.