Normally when you are making a tweak and you want to hook into a application you do something like this:
%hook foo
//code
%end
But now I have a @interface
that has a weird name: @interface NSString (foo)
, and I have no idea how to hook into this. I tried this:
%hook NSString (foo)
%end
But this gives an error:
Tweak.xm:12:3: error: C++ requires a type specifier for all declarations
(foo)
~^Tweak.xm:12:18: error: expected ';' after top level declarator (foo):