I'm tring to make tweak in Theos.
Thanks to many good tutorials, I am now able to make some simple tweak by myself.
But it doesn't always go well.
To make tweak, first I need to use utility called "class dump" to get application headers.
Second, by search and browse headers I have to guess which class I should hook.
Third, write code and make package.
I can't do second step well.
To guess how app works, I used logo(%orig, %log) in test tweak and 'syslog to /var/log/syslog'.
For example,
if there is following class header:
@interface SampleClass
- (id)methodA:(int)Arg;
.
.
@end
I write following code to make test tweak:
%hook SampleClass
- (id)methodA:(int)Arg {
%log;
NSLog(@"return Class is %@", NSStringFromClass([%orig class]);
NSLog(@"Argument value is %d", Arg);
}
%end
In this way, I could recognize return Class and Arguments by test tweak.
But, I can't know what is done in 'methodA' perfectly.
Concretely, I want to know what kind of original code is written , and what method calls what method.
Is there any idea to know them??