Microsoft Word - iOSAppReverseEngineering.docx

(Romina) #1
* thread #1: tid = 0x4192b, 0x317aa9c0 Preferences`-[PSListController
tableView:cellForRowAtIndexPath:] + 988, queue = ‘com.apple.main-thread, stop reason =
breakpoint 11.1
frame #0: 0x317aa9c0 Preferences`-[PSListController
tableView:cellForRowAtIndexPath:] + 988
Preferences`-[PSListController tableView:cellForRowAtIndexPath:] + 988:




  • 0x317aa9c0: blx 0x31825f04 ; symbol stub for:
    ____NETRBClientResponseHandler_block_invoke
    0x317aa9c4: movw r0, #4312
    0x317aa9c8: movt r0, #1737
    0x317aa9cc: add r0, pc
    (lldb) p (char )$r1
    (char
    ) $97 = 0x318362d2 "refreshCellContentsWithSpecifier:"
    (lldb) po $r2
    My Number ID:myNumberCell 0x170ece60 target:<PhoneSettingsController
    0x170ed760: navItem <UINavigationItem: 0x170d0b40>, view <UITableView: 0x16acb200; frame
    = (0 0; 320 568); autoresize = W+H; gestureRecognizers = <NSArray: 0x15d232d0>; layer =
    <CALayer: 0x15fc9110>; contentOffset: {0, -64}; contentSize: {320, 717.5}>>
    (lldb) po [$r2 class]
    PSSpecifier





As the output shows, “something specific”, i.e. specifier, is a PSSpecifier object, and it’s


tightly related to my number. If you have carefully read the preferences specifier plist standard


in section PreferenceBundle of the last chapter, you would know that the contents of a


PSTableCell are specified by a PSSpecfier. Further more, we can acquire the setter and getter of


PSSpecifier through [PSSpecifier propertyForKey:@“set”] and [PSSpecifier


propertyForKey:@“get”] like this:


(lldb) po [$r2 propertyForKey:@"set"]
setMyNumber:specifier:
(lldb) po [$r2 propertyForKey:@"get"]
myNumber:

We can also get their target through [PSSpecifier target]:


(lldb) po [$r2 target]
<PhoneSettingsController 0x170ed760: navItem <UINavigationItem: 0x170d0b40>, view
<UITableView: 0x16acb200; frame = (0 0; 320 568); autoresize = W+H; gestureRecognizers =
<NSArray: 0x15d232d0>; layer = <CALayer: 0x15fc9110>; contentOffset: {0, -64};
contentSize: {320, 717.5}>>

Excellent! Now we know my number on PSTableCell is set through


[PhoneSettingsController setMyNumber:specifier:], and is got through


[PhoneSettingsController myNumber:] (Do you still remember these 2 methods?), so there


must be a method inside myNumber: that returns my number, as shown in figure 6-42.

Free download pdf