Skip to content
Guest Big Announcement

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

Featured Replies

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

Solved by i0s_tweak3r

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

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

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.