Skip to content
Guest Big Announcement

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

Featured Replies

Solved by Ted2

  • Solution

Write the id as NSNumber & set number to 1, 1= true

 

edit nvm. Didn't saw ir picture

 

%hook UnlockManager

 

 -(bool)wasUnlocked:(id)arg1 {
	return; TRUE
	%orig (NULL);
	}
	%end 

Updated by Ted2

8 minutes ago, Ted2 said:

Write the id as NSNumber & set number to 1, 1= true

 

edit nvm. Didn't saw ir picture

 

%hook UnlockManager

 


 -(bool)wasUnlocked:(id)arg1 {
	return; TRUE
	%orig (NULL);
	}
	%end 

what if we want the the id to be pass through ? is it 

    %orig (NULL); 

 

??

1 minute ago, TheArmQueen said:

what if we want the the id to be pass through ? is it 

    %orig (NULL); 

 

??

No %orig(arg1);

 

 
%hook something	 -(bool)functionnams:(id)arg1:(id)arg2 {	return; TRUE	%orig (arg1,arg2);	}	%end 	
		
 
yhe '-' isn't supposed to be there. Can't edit on phone somehow ??

Updated by Ted2

@Ted2

I ran it on FLexConverter ( unfortunately it doesnt support 2 args) but for 1 arg this is the code it generated:

%hook UnlockManager
-(BOOL) wasPurchased:(id)arg1 {
return TRUE;
}
%end

any difference ? 

12 minutes ago, TheArmQueen said:

@Ted2

I ran it on FLexConverter ( unfortunately it doesnt support 2 args) but for 1 arg this is the code it generated:


%hook UnlockManager
-(BOOL) wasPurchased:(id)arg1 {
return TRUE;
}
%end

any difference ? 

It skips the argument. Sometime your tweak won't work if you don't include the argument. Also flexcoverter sucks so do it manually or using a nic template

5 minutes ago, Ted2 said:

It skips the argument. Sometime your tweak won't work if you don't include the argument. Also flexcoverter sucks so do it manually or using a nic template

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

@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

 

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.