Exploring UIKit Internals with Hopper Disassembler

Nov 5 2019 · Video Course (32 mins) · Advanced

Explore private UIKit APIs using the reverse engineering tool Hopper Disassembler and then use your advanced knowledge of UIKit's hidden secrets to your advantage in your own app.

5/5 4 Ratings

Version

  • Swift 5.1, iOS 13.1, Xcode 11.1

Using Hopper Disassembler

See what happens when you try to nest navigation controllers using strictly public API by observing the assertion and associated stack trace.

1

Download and install Hopper, find the right UIKit binary in Xcode and start disassembling the binary.

2

Look at some initial symbols and get a sense for what functionality Hopper offers and how it displays pseudo code.

3

Nesting Navigation Controllers

Take the asserting stack trace and use Hopper to understand how UIKit reached the assertion.

4

Discover how UIKit leverages private API to make nesting work internally.

5

Leverage basic KVC to nest navigation controllers using the same API that UIKit uses.

6

Tweak the app so UIKit is happy with your use of its APIs without really knowing what those requirements are.

7

Managing Navigation Bars

See how hiding the navigation bar could have unintended side effects now that you're using private API.

8

Use Hopper again to understand why the wrong navigation bar is hidden and find a possible workaround.

9

Experience first hand why using private API is dangerous but how you can make UIKit still bend to your will.

10

Who is this for?

This course is for experienced developers who are interested in getting a deeper understanding of how Apple's frameworks are built.

The course assumes extensive knowledge of Xcode, UIKit, and to some extent Objective-C, since that's what most Apple frameworks are written in. Being familiar with the history of iOS and what features shipped with what iOS releases is useful, though not required.

Covered concepts

  • Using Hopper to find public and private UIKit symbols.
  • Reverse engineering implementations of classes and methods in UIKit.
  • Relating stack traces in Xcode to their reverse engineered implementations.
  • Leveraging that knowledge to enhance a basic app with private UIKit functionality.

Contributors

Comments