[iOS Jailbreak development vi] using CLASS-DUMP to export frameworks header files

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.