Xcode 4.5.2 Certificate-free real machine debugging and IPA generation tutorial

Source: Internet
Author: User
Tags key string

IOS is generally available on virtual machines, but when the product is nearing completion, we still need to check the effect on the real machine.

Or you can write a small program and share it with your friends.

Environment: Mac OS 10.8.2 xcode 4.5.2, A jailbroken iPhone/touch host, (iOS devices need to jailbreak and install appsync from cydia .)

1.Create a false certificate

The process of creating a certificate is relatively simple. Open the utility-key string access. In the menu bar, click Key string access-certificate assistant-create certificate to open the wizard. The first step is important. You must name it iPhone developer, set the type to code signature, and select "let me overwrite these default values. The subsequent steps do not need to be changed. Click "OK" and "continue" to complete the wizard.


Many articles describe the path of the configuration file, which must be described here, because different xcode versions have different paths.



The earlier version directory may be/developer/platforms/iphoneos. Platform/developer/sdks/iphoneosxxx. SDK/

The current version directory of xcode4.5.2 is:/applications/xcode. APP/contents/developer/platforms/iphoneos. Platform/developer/sdks/iphoneos6.0.sdk

Note: Why is it possible? I don't know which version of the directory has changed.

 

2. Modify the sdksettings. plist File

Find/applications/xcode. APP/contents/developer/platforms/iphoneos. platform/developer/sdks/iphoneos6.0.sdk directory sdksettings. in the plist file, modify "default properties". The values of "code_signing_required" and "entitlements_required" are: No.

Note: because the file format and the previous version of xcode have changed, it is recommended that xcode open the plist file so that no errors can be made during the modification process.

3. Modify the info. plist File

Find the info. plist file in the/applications/xcode. APP/contents/developer/platforms/iphoneos. Platform directory.

Add two items

Provisioning_profile_allowed = No

Provisioning_profile_required = No

Then, replace all "xciphoneoscodesigncontext" in the file with "xccodesigncontext ". There should be three changes. Under defaultproperties, runtimerequirements, and overrideproperties respectively.

4. modify the configuration file and restart xcode.



5. Add an entitlements. plist file to the project to allow debugging.

Note: If you do not perform this step, you may encounter an error: failed to get the task for process XXX.

A. New-> file-> iOS-> resouce-> property list

Set the file name to entitlements. plist.

B. Open the entitlements. plist file.

Add an attribute can be debugged and set the attribute value to yes.

C. Modify the value of the build setting attribute of targets.

Change the value of code signing entitlements to "entitlements. plist"

Set any ios sdk in code signing identity to iPhone developer, and change others to don't code sign. (This must match the name in the certificate)

We can see that the app is on your iPhone.

When you run the program, you can view the log printed during the iPhone running through organizer.

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.