Jump to content

Flex pass-through - How to in tweak.xm?


Go to solution Solved by i0s_tweak3r,

9 posts in this topic

Recommended Posts

Posted (edited)

Currently trying to compile a NJB tweak for someone, but all his patches in flex return pass-through, including arguments.

I've no idea how to do that in tweak.xm

 

I tried:

return %orig;

return %orig(arg1, arg2);

 

But it doesn't work for him.

 

Anyone can apply it to this hook as example?

 

%hook SomeClass

-(id)someMethod:(int)arg1:(Class)arg2:(int)arg3:(id)arg4:(Class)arg5:(bool)arg6:(bool)arg7:(bool)arg8 {
	return nil;
}
%end

 

Thankyou.

Updated by Ted2
Posted

Why can’t that someone make a Help topic?

Posted
1 minute ago, DiDA said:

Why can’t that someone make a Help topic?

Idk, he said "maybe DiDa could help?"

So I thought let's make a proper topic before he PM's you LUL  

Posted
23 minutes ago, Ted2 said:

No that won't work

How about "  return; "

" return %orig(); "

 

Or there is no need for it :dunno:

Posted
2 minutes ago, Amuyea said:

How about "  return; "

" return %orig(); "

 

Or there is no need for it :dunno:

Tried both :(

  • Solution
Posted (edited)
4 hours ago, Ted2 said:

Currently trying to compile a NJB tweak for someone, but all his patches in flex return pass-through, including arguments.

I've no idea how to do that in tweak.xm

 

I tried:

return %orig;

return %orig(arg1, arg2);

 

But it doesn't work for him.

 

Anyone can apply it to this hook as example?

 


%hook SomeClass

-(id)someMethod:(int)arg1:(Class)arg2:(int)arg3:(id)arg4:(Class)arg5:(bool)arg6:(bool)arg7:(bool)arg8 {
	return nil;
}
%end

 

Thankyou.

A lot of ppl modify the Flex patches directly from xml file so it looks like pass-through but actually they add a Selector, or edit it so u don't see the overrides in Flex app itself, only by looking at plist.

You can try just "%orig;" by itself. If you return nil you are modifying the "id" of the method tho. If thats what u want to do is return nil but leave rest alone, then just 

%hook class

method blah blah

{

%orig;

return;

}

Edited to add: Re-read first line that you didn't make it. Yeah you have to go to /Library/Application Support/Flex 3/patches.plist

Open the plist, find the patch, and there lies your answers. The overrides used will be there. There's some tutorials on here for manually editing Flex patches I believe for familiarizing yourself with how it was created.

Updated by i0s_tweak3r
realized it wasnt self made patch edited answer

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