Search code examples
iosobjective-cjailbreak

iOS Jailbroken devices development: How to dump method calls


I am pretty new to development for iOS devices with jailbreak. From what I am reading I understand that to be able to do all the cool things which you can't do on non-jailbroken phones you have to hook up to a given class and override some of its behaviour. Since there is no documentation how a developer tracks to which class exactly he should hook?
I imagine that for instance if I wanted to have my app respond to a given event such as phone boot, call hang up or user clicking on an icon I would manually generate the given event and see what invocations have been made. Is this the proper way to track where you should hook your code and if yes how is it done.
Note I am not interested in exactly those events mentioned above I am more interested the approach in general.


Solution

  • There are several approaches:

    • Disassemble binaries

    You can disassemble a binary or just dump classes with something like class-dump. So, you can see the whole hierarhy of classes.

    • Find dumped classes

    Most of major iOS subsystems were dissasembled by somebody already. You can find quite a lot of useful stuff.

    As example. Google search "Springboard headers" got this

    • Dump classes in a runtime.

    Look at this question for explanation: List selectors for Objective-C object