How to get the private API for iOS

Source: Internet
Author: User

Objective

As an iOS developer, I believe most partners are interested in how to get the private API for iOS, and recently, by looking up data, summarize the following three ways to help you.

The first kind (class-dump)

I have to say that this is a great tool, easy to install and use.

Installation

Go to Nygard/class-dump to download the project, compile it and get class-dump, put it in

"/usr/bin"

folder, note that this address varies according to the system, my system is

10.10.5

, some of the lower versions of the system are

"/usr/local/bin"

, this is based on your own system attention can be.

Note: Before iOS9, that is, before the Xcode7, you can go directly to Class-dump, but after iOS9 with this version of the export will report the wrong

Input file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/PrivateFrameworks/ChatKit.framework) doesn‘t contain an executable.

This is because IOS9 has added a call

"the __DATA_CONST segment"

of the Dongdong.

Use

First modify the permissions of the Class-dump

$ chmod 777 class-dump

Note that this step is performed at the root of the folder where the Class-dump is located.

Then you can use it, as follows:

class-dump-h/applications/ Xcode. app/contents/Developer/platforms/iphonesimulator. Platform/developer/sdks/ iPhoneSimulator9.2. sdk/system/Library/ privateframeworks/chatkit. Framework-o < storage address;      

This will export the header files that are not exposed by the Chatkit.framework framework to where you store them.

The second type (Class-dump + dumpframework.pl)

This method is more powerful than the first method is the ability to export all the private API header files to a call

header

In the folder.

Installation

Class-dump installation See the first method, dumpframework.pl can go shuhongwu/hackspringdemo download, put in any directory can be.

Configuration

Open the dumpframeworks.pl file and change the address below to your own address.

dump_frameworks(‘/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks‘,                ‘Frameworks‘);dump_frameworks(‘/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/PrivateFrameworks‘, ‘PrivateFramework‘);

Attention:

‘Frameworks‘

Be sure to break the line. What's more, this is the private API of the emulator, because the Class-dump object must be an unencrypted executable file, and the app downloaded from the App Store is signed and encrypted. So two iphonesimulator.platform places cannot be replaced by Iphoneos.platform.

Use

CD-To-dumpframeworks.pl path and execute

$ ./DumpFrameworks.pl

If there is no problem, all the required header files have been exported to

~/user/header

Folder.

Third method (clone)

In fact, this is a lazy way, you can go directly to
Nst/ios-runtime-headers download will be ready, here will be updated at any time.

Something

It's really cool to take advantage of the private API, which can be a lot of cool things to do with your needs and hobbies, but if you need to upload AppStore, don't use it because it's officially banned by Apple. If you feel you can avoid censorship by means of encryption, you can look at the reverse of the exclusive project.



How to get the private API for iOS

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.