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