Microsoft Word - iOSAppReverseEngineering.docx

(Romina) #1

It’ s easy to locate the control object that shows “+86PhoneNumber”, and we can say for


sure its cell is a PSTableCell object without test. Try to hide this cell to verify our guesses:


cy# [#0x17f92890 setHidden:YES]

Now, MobilePhoneSettings looks like figure 6-15:


Figure 6-15 Hide the top cell


So the description of the top cell is <PSTableCell: 0x17f92890; baseClass =


UITableViewCell; frame = (0 35; 320 44); text = ‘My Number’; autoresize = W; tag = 2; layer =


<CALayer: 0x17f92a60>>. Unlike “compose” button, our current target is not the response


method of this cell (i.e. function), but the content (i.e. data) it shows, hence


actionsForTarget:forControlEvent: is no longer our choice. Facing this kind of situation, what


shall we do?


In most cases, data we are interested in would not be a constant. If this data is constantly 1, I


believe you won’t be interested at all. So, when our target is a variable, one question needs to be


thought about: where does the variable come from?


Any variable does not come from nowhere. It originates from a data source and is generated


by a specific algorithm. Usually, our focus is on that algorithm, namely, how the data source


becomes the variable. This process is usually comprised of multiple functions, which form a call


chain like the pseudo code below:


id dataSource = ?; // head
Free download pdf