(char *) $18 = 0x33274340 "_currentIDStatusForDestinations:service:listenerID:"
(lldb) po $r0
<IDSIDQueryController: 0x15dcb010>
(lldb) po $r2
<__NSArrayM 0x170e7900>(
mailto:[email protected]
)
(lldb) po $r3
com.apple.madrid
(lldb) po [$r3 class]
__NSCFConstantString
(lldb) x/10 $sp
0x001e4548: 0x3b3f52b8 0x001e459c 0x3b4227b4 0x3c01b05c
0x001e4558: 0x00000001 0x00000000 0x170828d0 0x001e4594
0x001e4568: 0x2baac821 0x00000000
(lldb) po 0x3b3f52b8
__kIMChatServiceForSendingIDSQueryControllerListenerID
(lldb) po [0x3b3f52b8 class]
__NSCFConstantString
(lldb) c
Success belongs to the persevering. This objc_msgSend is restored to
[[IDSIDQueryController sharedInstance]
_currentIDStatusForDestinations:@[@"mailto:[email protected]"]
service:@"com.apple.madrid"
listenerID:@"__kIMChatServiceForSendingIDSQueryControllerListenerID"]. Since the last 2
arguments are constants, the only variable argument is the first array, i.e. the recipient array.
What a long journey! We’ve finally tracked down the original data source!
I know, I know, this section is so hard that you’re already dizzy now. Stay up for a while,
we’re almost done with this task.
10.2.5 Restore the process of the original data source becoming
placeholderText
Now that we have found the core method, seems we can detect whether an address
supports iMessage by modifying the first argument, i.e. the NSArray of recipients. As long as the
key (an address) associated value (an integer) in the return value (an NSDictionary) is neither 0
nor 2, we can confirm that this address supports iMessage; otherwise it only supports SMS. Is
that so? As we already know, the format of email addresses is “mailto:email@address”, how
about phone number format? Let’s set a breakpoint on
_currentIDStatusForDestinations:service:listenerID and take a look:
Process 102482 stopped