Mobile Development 12 min read

WBBlades: An Open‑Source Mach‑O Analysis Toolkit for iOS App Size, Unused Class Detection, and Crash Log Symbolization

WBBlades is an open‑source iOS toolset that parses Mach‑O files to provide size analysis, high‑precision unused‑class detection, and crash‑log symbolization without requiring symbol tables, offering both a macOS GUI and command‑line interface for developers to optimize and debug their apps.

58 Tech
58 Tech
58 Tech
WBBlades: An Open‑Source Mach‑O Analysis Toolkit for iOS App Size, Unused Class Detection, and Crash Log Symbolization

WBBlades, released by 58.com, is a collection of iOS analysis tools built on Mach‑O file parsing. It includes three core utilities: an app size analysis tool that simulates the linker to compute static‑library size without compilation, an unused‑class detection tool that improves accuracy over otool‑based methods by handling inheritance, dynamic calls, and property references, and a crash‑log parsing tool that symbolizes stack traces without needing dSYM files.

The toolkit extracts class and method information from the __DATA,__objc_classlist and related sections, reconstructs class structures (see struct class64 { unsigned long long isa; unsigned long long superClass; unsigned long long cache; unsigned long long vtable; unsigned long long data; }; struct class64Info { unsigned int flags; unsigned int instanceStart; unsigned int instanceSize; unsigned int reserved; unsigned long long instanceVarLayout; unsigned long long name; unsigned long long baseMethods; unsigned long long baseProtocols; unsigned long long instanceVariables; unsigned long long weakInstanceVariables; unsigned long long baseProperties; }; ), and locates method addresses to determine function boundaries using the ARM64 ret opcode (0xC0035FD6).

Compared with traditional link‑map analysis, WBBlades achieves comparable accuracy (within 10% deviation) while eliminating the need for compilation and linking. It also offers a visual macOS application and a command‑line interface for automation.

Future work includes extending support to Fat binaries, armv7 architecture, and adding C++/Swift parsing capabilities, as well as open‑sourcing the crash‑log parsing component.

Developers can contribute via the GitHub repository, submit issues or pull requests, and follow the provided usage guides for both GUI and terminal modes.

iOSMach-Oopen-sourceApp Size AnalysisUnused Class DetectionCrash Symbolization
58 Tech
Written by

58 Tech

Official tech channel of 58, a platform for tech innovation, sharing, and communication.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.