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

  • Solution
Posted (edited)

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
Posted
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); 

 

??

Posted
1 minute ago, TheArmQueen said:

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

    %orig (NULL); 

 

??

No %orig(arg1);

 

Posted (edited)
 
%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
  • Like 1
Posted

@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 ? 

Posted
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

Posted
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: 

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