Xcode 4.6 + iOS 6 Certificate-Free Real-machine debugging

Source: Internet
Author: User

Although it is necessary to support genuine materials, it is not a small cost for the learning phase of $99. So I studied how to debug the certificate-free real machine. Of course, this 99-knife is still needed when the app is to be published to the appstore. Okay, let's talk less, and go straight to the topic.

Self-cracking environment: xcode 6.3, iPhone 4 (jailbroken and appsync installed through cydia), and you can use this iPhone for real-machine debugging.

Overall 4 parts:

1. issue a certificate for yourself to generate Program Signature 2. Modify the project configuration and xcode configuration files and binary files to prevent them from being verified and signed 3. Use the custom generation step to sign the application with a forged certificate
4. Modify the Project Settings and debug the real machine.

1. The process of creating a certificate is relatively simple. Open lanchpad> utility> keychain access. Click keychain access> certificate assistant> Create a certificate in the menu bar.
The first step is important. You must name it iPhone developer, set the type to code signing, and select "let me override ults. The subsequent steps do not need to be changed. Click "OK" and "continue" to complete the wizard.

2. modify the configuration file and binary file of xcode and exit xcode first. Press command + Q to close it completely.
Then, perform the following operations in sequence:

2.1 CD/applications/xcode. APP/contents/developer/platforms/iphoneos. Platform/developer/sdks/iphoneos6.1.sdk

2.2 sudo CP sdksettings. plist sdksettings. plist. orig

2.3 sudo Vim sdksettings. plist: Change yes in the following two sections to no <key> code_signing_required </key> <string> Yes </string> and <key> entitlements_required </key> <string> Yes </ string>

2.4 CD/applications/xcode. APP/contents/developer/platforms/iphoneos. Platform

2.5 sudo CP info. plist info. plist. orig

2.6 sudo/applications/xcode. APP/contents/MACOs/xcode/applications/xcode. APP/contents/developer/platforms/iphoneos. Platform/info. plist

Change all xciphoneoscodesigncontext to xccodesigncontext

There are three branches: defaultproperties branch, runtimerequirements branch, and overrideproperties branch.

3. Prepare a custom post-generated script (this step must ensure that the computer is connected to the Internet and executed as a root user)

3.3 mkdir/applications/xcode. APP/contents/developer/iphoneentitlements3.4 CD/applications/xcode. APP/contents/developer/iphoneentitlements3.5 curl-O http://www.alexwhittemore.com/iphone/gen_entitlements.txt3.6 MV gen_entitlements.txt uninstall chmod 777 gen_entitlements.py

4. Modify Project Settings
Note: you only need to modify the configuration file and prepare the script once before this phase. However, this phase of operation is required for every project that requires real machine debugging.
4.1 disable automatic xcode Signature
Set all except any ios sdk under the code signing option in the project configuration to don't code sign, and select the certificate iPhone developer created earlier.

4.2 Add custom post-generated scripts
Add a phase in build phases, add build phase in the lower right corner, click Add run script, and enter the following script:
Export codesign_allocate =/applications/xcode. APP/contents/developer/platforms/iphoneos. platform/developer/usr/bin/codesign_allocateif ["$ {platform_name}" = "iphoneos"] | ["$ {platform_name}" = "ipados"]; then/applications/xcode. APP/contents/developer/iphoneentitlements/gen_entitlements.py "My. company. $ {project_name} "" $ {built_products_dir}/$ {wrapper_name}/$ {project_name }. xcent "; codesign-F-s" iPhone developer "-- entitlements" $ {built_products_dir}/$ {wrapper_name}/$ {project_name }. xcent "" $ {built_products_dir}/$ {wrapper_name}/"fi


Now you can plug in your iPhone and choose your device to run the program.

OriginalArticle, Reprinted, please specify the Source: withiter

Related Article

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.