Jump to content

Question regarding the hooking method


kevindurant35

3 posts in this topic

Recommended Posts

Posted

This is the basic Template:

%hook TargetClass //TargetClass from Flex
- (void)productPurchased:(id)product //Target Method from flex, MAKE SURE to add names after :(id), :(bool), :(int) etc
    name = nil; //Set the argument to nil (null), use the name you provided for the argument
    %orig(); //call %orig;, Note how the method is - (void), if it was something else, use "return %orig();"
}
%end

You result should be: (Please don't look this before attempting to fill out the template above, so you can actual learn)

 

%hook MyLessonsViewController
- (void)productPurchased:(id)product {
   produc = nil;
   %orig();
}
%end

 

 

Posted

This is the basic Template:

%hook TargetClass //TargetClass from Flex
- (void)productPurchased:(id)product //Target Method from flex, MAKE SURE to add names after :(id), :(bool), :(int) etc
    name = nil; //Set the argument to nil (null), use the name you provided for the argument
    %orig(); //call %orig;, Note how the method is - (void), if it was something else, use "return %orig();"
}
%end

You result should be: (Please don't look this before attempting to fill out the template above, so you can actual learn)

 

 

%hook MyLessonsViewController
- (void)productPurchased:(id)product {
   produc = nil;
   %orig();
}
%end

 

 

 

Thank you for the mini tutorial ! Very clear instructions !!! Have a good day :))

Archived

This topic is now archived and is closed to further replies.

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