Group Group Group Group Group Group Group Group Group

Chapter 10 Maps application


When I work through the last exercise of the chapter 10 (p. 139 of the PDF of version 2 of the book), the one about finding the name and receiver of the upper right button in the Maps application, I’m getting different output than that given in the picture of the terminal output in the book. My terminal output looks like this:

(lldb) c
Process 2043 resuming
Process 2043 stopped
* thread #1, queue = '', stop reason = breakpoint 1.1
    frame #0: 0x0000000108c93bf9 UIKit`-[UIControl sendAction:to:forEvent:]
UIKit`-[UIControl sendAction:to:forEvent:]:
->  0x108c93bf9 <+0>: pushq  %rbp
    0x108c93bfa <+1>: movq   %rsp, %rbp
    0x108c93bfd <+4>: pushq  %r15
    0x108c93bff <+6>: pushq  %r14
Target 0: (Maps) stopped.
(lldb) po (SEL)$rdx

(lldb) po $rcx
<_MKUserTrackingButtonController: 0x60c00027dc80>

Maybe this is due to some change in the Maps app itself between iOS 10 and iOS 11?

FWIW, the selector and receiver given in the book both still seem to be there, they just don’t seem to be attached to that button anymore.

(lldb) image lookup -n _requestLocationServicesAuthorizationIfNeeded
1 match found in /Applications/
        Address: Maps[0x00000001001f4c02] (Maps.__TEXT.__text + 2042066)
        Summary: Maps`-[FloatingControlsViewController _requestLocationServicesAuthorizationIfNeeded]

@lolgrep Do you have any feedback regarding this? Thank you - much appreciated! :]

opened #4