4 class-dump is a command-line utility for examining the Objective-C
5 segment of Mach-O files. It generates declarations for the classes,
6 categories and protocols. This is the same information provided by
7 using 'otool -ov', but presented as normal Objective-C declarations.
9 The latest version and information is available at:
11 http://stevenygard.com/projects/class-dump
13 The source code is also available from my Github repository at:
15 https://github.com/nygard/class-dump
20 class-dump 3.4 (64 bit)
21 Usage: class-dump [options] <mach-o-file>
24 -a show instance variable offsets
25 -A show implementation addresses
26 --arch <arch> choose a specific architecture from a universal binary (ppc, ppc64, i386, x86_64)
27 -C <regex> only display classes matching regular expression
28 -f <str> find string in method name
29 -H generate header files in current directory, or directory specified with -o
30 -I sort classes, categories, and protocols by inheritance (overrides -s)
31 -o <dir> output directory used for -H
32 -r recursively expand frameworks and fixed VM shared libraries
33 -s sort classes and categories by name
34 -S sort methods by name
35 -t suppress header in output, for testing
36 --list-arches list the arches in the file, then exit
37 --sdk-ios specify iOS SDK version (will look in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS<version>.sdk
38 --sdk-mac specify Mac OS X version (will look in /Developer/SDKs/MacOSX<version>.sdk
39 --sdk-root specify the full SDK root path (or use --sdk-ios/--sdk-mac for a shortcut)
43 class-dump /System/Library/Frameworks/AppKit.framework
47 class-dump /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/System/Library/Frameworks/UIKit.framework
49 - class-dump UIKit and all the frameworks it uses:
51 class-dump /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/System/Library/Frameworks/UIKit.framework -r --sdk-ios 4.3
53 - class-dump UIKit (and all the frameworks it uses) from developer tools that have been installed in /Dev42 instead of /Developer:
55 class-dump /Dev42/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/System/Library/Frameworks/UIKit.framework -r --sdk-root /Dev42/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk
61 This file is part of class-dump, a utility for examining the
62 Objective-C segment of Mach-O files.
63 Copyright (C) 1997-1998, 2000-2001, 2004-2012 Steve Nygard.
65 This program is free software; you can redistribute it and/or modify
66 it under the terms of the GNU General Public License as published by
67 the Free Software Foundation; either version 2 of the License, or
68 (at your option) any later version.
70 This program is distributed in the hope that it will be useful,
71 but WITHOUT ANY WARRANTY; without even the implied warranty of
72 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
73 GNU General Public License for more details.
75 You should have received a copy of the GNU General Public License
76 along with this program; if not, write to the Free Software
77 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
82 You may contact the author by:
83 e-mail: nygard at gmail.com