Jump to content

How do I write this in theos iOS 10? (Hooking)


Go to solution Solved by Ted2,

13 posts in this topic

Recommended Posts

Posted
4 minutes ago, TheArmQueen said:

True , i made 2 tweaks , the one without %orig didnt work , your code worked like a charm (y):hug: 

:)

Posted

@TheArmQueen I had the same issue with my tweak having 2 arguments but @Ted2 helped me, the only problem was that when he returned the original action it seemed to interfere with argument 2 and it instead returned the original value of arg 2 to arg 1 but that ended up being better anyway in my case.

Here was what I was referring to.

#import "substrate.h"
#import "SpringBoard/SpringBoard.h"

%hook PromoteViewController

-(void)goBuyViews:(int)arg1 numbercoins:(int)arg2 {
%orig (arg2, 5);
}
%end

%hook AppDelegate

- (void)applicationDidBecomeActive:(id)application {
    NSUserDefaults *validate = [NSUserDefaults standardUserDefaults];
    NSString *alreadyRun = @"already_run";
    if ([validate boolForKey:alreadyRun])  
    return;
    [validate setBool:YES forKey:alreadyRun];
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@“READ Important
    message:@"Before using this make sure you stick to 1 active promotion per google account at one time for it not to get blocked. Views amount = Cost amount e.g 600 coins for 100 views = 600 views. Watch 1 video to get your 600 views, if it gets block after a day do 100 views instead (normal max). Enjoy your free unlimited Views and Likes!” delegate:nil cancelButtonTitle:@"Thanks AUSSIE G4M3R"
    otherButtonTitles:nil];
    [alert show];
    [alert release];
}
%end

 

Posted
4 minutes ago, AUSSIE G4M3R said:

@TheArmQueen I had the same issue with my tweak having 2 arguments but @Ted2 helped me, the only problem was that when he returned the original action it seemed to interfere with argument 2 and it instead returned the original value of arg 2 to arg 1 but that ended up being better anyway in my case.

Here was what I was referring to.


#import "substrate.h"
#import "SpringBoard/SpringBoard.h"

%hook PromoteViewController

-(void)goBuyViews:(int)arg1 numbercoins:(int)arg2 {
%orig (arg2, 5);
}
%end

%hook AppDelegate

- (void)applicationDidBecomeActive:(id)application {
    NSUserDefaults *validate = [NSUserDefaults standardUserDefaults];
    NSString *alreadyRun = @"already_run";
    if ([validate boolForKey:alreadyRun])  
    return;
    [validate setBool:YES forKey:alreadyRun];
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@“READ Important
    message:@"Before using this make sure you stick to 1 active promotion per google account at one time for it not to get blocked. Views amount = Cost amount e.g 600 coins for 100 views = 600 views. Watch 1 video to get your 600 views, if it gets block after a day do 100 views instead (normal max). Enjoy your free unlimited Views and Likes!” delegate:nil cancelButtonTitle:@"Thanks AUSSIE G4M3R"
    otherButtonTitles:nil];
    [alert show];
    [alert release];
}
%end

 

 

what , i dont get it ....

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
×
  • 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