Personal Original, reprint please indicate source:Cnblogs.com/jailbreaker
Class_dump This tool, you can export the SDK like the API header file, you can also export other people's app used in the header files, tools are open source, author website:http://stevenygard.com/projects/class-dump/.
After downloading the website after DMG to open and copy the Class-dump to the/usr/bin/directory (this is my bin directory, which may be different from your own path), you can use the open-a finder/usr/bin command to open.
Then modify the next Class-dump permissions, terminal input chmod 777/usr/bin/class-dump.
There is a Perl script on the Web (dumpframeworks.pl), you can directly export frameworks and Privateframeworks header files, 2 frameworks path changes, I paste directly on dumpframeworks.pl the source code.
#!/usr/bin/perl
#
# November 2008
# Framework Dumping utility; Requires Class-dump
#
use strict;
Use CWD;
Use File::P Ath;
my $HOME = (getpwuid($<)) [7] | | $ENV {' HOME '}
ordie "Could not find your home directory!" ;
# This command must is in your path.
# http://www.codethecode.com/projects/class-dump/
my $CLASS _dump = ' Class-dump ';
# Public Frameworks
dump_frameworks ('/applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/ Sdks/iphoneos7.1.sdk/system/library/frameworks ',
' Frameworks ');
# Private Frameworks
dump_frameworks ('/applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/ Sdks/iphoneos7.1.sdk/system/library/privateframeworks ',
' Privateframeworks ');
Sub Dump_frameworks
{
my ($dir, $subdir) = @_;
opendir(my $dirh, $dir) ordie "Could not Opendir ($dir ) - $!" ;
# Iterate through each framework found in the directory
foreach my $file (grep {/\.framework$/} readdir($DIRH))
{
# Extract the framework name
(my $fname = $file) =~ s/\.framework$//;
Print"Framework: $fname \ n";
My $headers _dir = "$HOME/headers/$subdir/$fname";
# Create the folder to store the headers
Mkpath ($headers _dir);
# Perform the Class-dump
my $cwd = CWD ();
chdir($headers _dir) ordie "Could not chdir ($headers _dir)-$!" ;
system ($CLASS _dump, '-h ', "$dir/$file");
if ($? = = -1)
{
die "Could not execute $CLASS _dump-$!\n";
}
chdir($CWD) ordie "Could not ChDir ($CWD)-$!" ;
}
}
after saving, the terminal enters the directory where dumpframeworks.pl executes the command ./dumpframeworks.pl
After the command is executed, Headers will appear in the user directory, including the frameworks and Privateframeworks folders we exported, see:
[iOS Jailbreak development vi] using CLASS-DUMP to export frameworks header files