Badoo Alexander Nikishin Jun 11, 2020

Using Hopper to Investigate an iOS Bug

Article Summary

Alexander Nikishin from Bumble's engineering team cracked open iOS 13's binary code with a disassembler to find a bug Apple couldn't fix for 8 months. What he discovered was a single misplaced bit in a keyboard mask.

When iOS 13 broke phone number autocomplete suggestions in Bumble and Badoo's registration flows, Apple's bug reports went nowhere. Nikishin used Hopper Disassembler to reverse engineer UIKit's private classes, diving into assembly code and bit manipulation to pinpoint exactly why UIPredictionViewController was failing for phone pad keyboards.

Key Takeaways

Critical Insight

A single incorrect bit in UIKit's keyboard type validation mask broke phone number autocomplete, discoverable only through reverse engineering the compiled framework.

The investigation reveals how Apple's iOS 13 refactoring introduced the bug and why symbolic breakpoints became essential for tracking system-level function calls.

About This Article

Problem

Badoo and Bumble both lost phone number predictive suggestions in iOS 13 after updating. The issue persisted through versions 13.1, 13.2, and 13.3. Apple received multiple reports from developers but never fixed it.

Solution

Alexander Nikishin loaded UIKitCore.framework into Hopper Disassembler and examined the assembly code. He found a bit test instruction (bt ecx, eax) that checked against a 12-bit mask (0x930). This mask controlled which keyboard types could show predictions.

Impact

The investigation showed that UIKeyboardTypePhonePad was caught by Apple's filter meant to disable suggestions for numeric keyboards. Apple then updated their bug tracking system to say 'Potential fix identified for a future OS update'.