Tool

class-dump

Command-line utility that reads the Objective-C runtime metadata in Mach-O executables, frameworks and bundles and prints it as ordinary Objective-C declarations for the classes, categories and protocols it finds, the same information otool -ov shows in a more compact form. It can write one header file per class, recurse into the frameworks a binary uses, choose one architecture from a universal binary, filter or sort the output, and annotate it with instance-variable offsets and implementation addresses.

Requirements & limits

  • Dormant: the newest tag, 3.5, is dated 2013-11-16, GitHub release entries stop at 3.4, and the README points to the author's website for the latest version. The reviewed master commit, from 2019-03-15, is 75 commits past 3.5 and carries unreleased changes such as building with the macOS 10.14 SDK.
  • Builds use Xcode on macOS with the bundled class-dump.xcodeproj, whose targets set macOS 10.8 and 10.9 deployment targets. The README's usage text lists ppc, ppc64, i386 and x86_64, and the 3.5 changelog adds arm64; support for later Apple architectures or metadata formats is not documented.
  • Input is a Mach-O file, framework or bundle the user already has, and only Objective-C metadata is decoded; files with an encryption load command are flagged in the output header. The unreleased changelog says Swift types have a blank encoding and are now written as MISSING_TYPE, so Swift types are not recovered. Output is declarations without method bodies.
  • Tests/doTests.py is a Python 2 script that diffs an older and a newer build's output over the installed system frameworks; the repository has no CI. The README notice applies GPL-2.0-or-later, copyright 1997-2019 Steve Nygard, and there is no separate license file; ThirdParty/blowfish.c is LGPL-2.1-or-later. Headers generated from closed-source binaries remain subject to their owners' rights. Nothing was built or run.

About this entry

Type
Tool
Category
Native analysis tools
Relationship
Foundation tool
Targets
App · Binary

Sources reviewed

The description was reviewed against primary sources. This does not establish runtime testing, security auditing or verified compatibility.

Report an outdated entry Suggest a translation fix

Primary sources

  1. README.md GitHub · nygard/class-dump · Revision 2c82b4f
  2. CHANGELOG.md#L1-L15 GitHub · nygard/class-dump · Revision 2c82b4f
  3. class-dump.xcodeproj/project.pbxproj GitHub · nygard/class-dump · Revision 2c82b4f
  4. Source/CDClassDumpVisitor.m#L104-L112 GitHub · nygard/class-dump · Revision 2c82b4f
  5. Tests/doTests.py GitHub · nygard/class-dump · Revision 2c82b4f
  6. ThirdParty/blowfish.c GitHub · nygard/class-dump · Revision 2c82b4f
  7. https://github.com/nygard/class-dump/releases/tag/3.4

More in Native binaries

All 74 entries in Native binaries