43

Exploring UIKit Internals with Hopper Disassembler [SUBSCRIBER]

 4 years ago
source link: https://www.raywenderlich.com/5443810-exploring-uikit-internals-with-hopper-disassembler
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

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.

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

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

Nesting Navigation Controllers

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

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

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

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

Managing Navigation Bars

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

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

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

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.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK