IOS Jailbreak machine certificate-free debugging

Source: Internet
Author: User
Tags file info

Currently, the iOS program developed on Xcode can only run in Simulator simulator, if you want to put it on a real machine, you need an official Apple Certified developer account and a developer certificate idp,99 US $ A year!

As a novice to start learning iOS programming, it is really painful to spend so much money ... After some toss, learn from a variety of great God's posts, and finally succeeded in the real machine compile and run successfully!

Here are the ways to share with you.

My operating environment is: "PC" XCode6.0.1 + OS X 10.9.5 "real-computer ipod Touch" iOS6.1

Preparatory work:

1. First, you have to have a jailbreak iphone/ipod/ipad, the Jailbreak method is not available here.

2. Add the Source: http://apt.weiphone.com in the real machine Cydia used to test, download the Appsync for the real-system version.

3. Create a certificate on the computer that is used to sign the generated program.

Create a certificate

The process of creating a certificate is simple and opens "Other-keychain access" on your computer. Then click on "Keychain Access-Certificate Assistant-Create Certificate ..." in the menu bar to open the wizard. Note that here are three places where you have to name the iphone Developer, set the type to code signing, and select "Let me override these defaults". After the steps do not change, all the way to click "OK" and "continue", the final completion of this wizard can be.

4. If Xcode is in a running state, please command+q it off completely first. Then open "Other-terminal", we need to use some UNIX commands, may seem to be more cumbersome, but believe me, this is the annual savings of 99 dollars AH!

① into the iphone SDK directory with the following instructions:

    1. cd/applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/sdks/iphoneos8.0.sdk/

Note: Different versions of Xcode have different final version numbers. In Xcode 6.0 is IPHONEOS8.0.SDK, the future version may be a bit higher, earlier versions of the lower. Please make your own changes according to the actual situation. (If you do not know your version number, you can use the "ls" command to view all files.) )

② back up the original file, if the computer has a password, the system will prompt you to enter the password (input will not be displayed, hit Enter)

    1. sudo cp sdksettings.plist SDKSettings.plist.orig

③ Editing a configuration file sdksettings.plist

To facilitate the modification, we can open this file directly with Xcode. The first thing to open is the directory where the file is located:

    1. Open.

Double-clicking the sdksettings.plist in the pop-up Finder window launches the Xcode GUI, expands the Defaultproperties branch, and entitlements_required and Code_signing_ below Required two attributes to NO.

Note: You may encounter the system prompt "" sdksettings.plist "is locked for editing ...", this is because of the file read and Write permissions issue, the workaround is as follows:

First, modify the folder permissions, at which point our directory is IPHONEOS8.0.SDK, if the input instruction "CD." Return to the parent directory, "Ls-al" to view all the files, you will find the system display IPHONEOS8.0.SDK IPHONEOS.SDK, this means that IPHONEOS8.0.SDK is a shortcut to IPHONEOS.SDK, so the real folder we want to modify is IPHONEOS.SDK, and the instructions are as follows:

    1. sudo chmod-r 777 IPHONEOS.SDK

Then, modify the Read and write permissions for all files in the folder:

sudo chmod 777 *

Now double hit Open sdksettings.plist, you will find that the properties can not be modified just now!

④ Edit another configuration file Info.plist

    1. Cd/applications/xcode.app/contents/developer/platforms/iphoneos.platform
    2. sudo cp info.plist Info.plist.orig
    3. Open.

Double-click Open Info.plist in the pop-up finder window. Under the Defaultproperties branch, under the Runtimerequirements branch and the Overrideproperties branch, there are 3 places, and all the Xciphoneoscodesigncontext are modified to Xccodesigncontext.

Note: Same as step ③, you may encounter permissions problems, modify the permissions of the platforms folder and all files within the folder, as above.

5. Prepare a customized post-build script (this step needs to be done in a networked state)

    1. sudo mkdir/applications/xcode.app/contents/developer/iphoneentitlements
    2. Cd/applications/xcode.app/contents/developer/iphoneentitlements
    3. sudo curl-o http://www.alexwhittemore.com/iphone/gen_entitlements.txt
    4. sudo mv Gen_entitlements.txt gen_entitlements.py
    5. sudo chmod 777 gen_entitlements.py

6. Modify Project Settings

Note: Modify the configuration file, prepare the script, etc. before this stage, only need to do once. But the operation of this stage, for each need to debug the real machine to do the work once.

① Disabling the Xcode automatic signature operation

All of the Code signing options in the project configuration "Build Settings" are set to "T code sign".

② Add a custom post-build script in build phases, click the "+" sign in the upper-left corner, add a "New Run script Phase" and enter the following script:

  1. Export codesign_allocate=/applications/xcode.app/contents/developer/platforms/iphoneos.platform/developer/usr/ Bin/codesign_allocate
  2. if [ "${platform_name}" = = "Iphoneos" ] | | [ "${platform_name}" = = " ipados" ]; Then
  3. /applications/xcode.app/contents/developer/iphoneentitlements/gen_entitlements.py "My.company.${PROJECT_ NAME} " ${built_products_dir}/${wrapper_name}/${project_name}.xcent";
  4. Codesign-f -S "IPhone Developer" --entitlements "${built_products_dir}/${wrapper_name}/${project_name}. Xcent " " ${built_products_dir}/${wrapper_name}/ "
  5. Fi

Via:Liuliu ' s notebook

This configuration is all done!!! Even on your iphone/ipod/ipad, compile and run, see the real machine on the screen when the program ran up, 99 dollars will be saved!!!

Thanks to the great God post , provided by the Xcode 5 + iOS 7 certificate-free (IDP) Real machine debugging and generation of IPA full raiders.

IOS Jailbreak machine certificate-free debugging

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.