XCode Certificate-free development environment

Source: Internet
Author: User

XCodeFreeCertificateThe development environment is the content to be introduced in this article. If you are just like me, you are a developer who is interested in iOS development and cannot afford to spend $99 to buy a legitimate development License, this blog is perfect for you. If you are an Apple developerCertificateDevelopers can ignore this Blog.

InCertificateWhen developing iOS applicationsSimulatorEnvironment ). For iOS app development that has little to do with the hardware platform,SimulatorThe environment can simulate most functions, but once your application needs to involve actual hardware devices, such as cameras and sensorsSimulatorYou cannot meet your development needs. Thanks to the great gods, developers have already used self-Signed signatures on the Internet.CertificateTo bypassXCodeOfCertificateCheck, you can setXCodeThe compiled application is deployed on the actual iOS device for testing and debugging.

If Xcode is not cracked, on the one hand, it cannot be used to debug the real machine, nor can it compile the Release file of the real machine. You can only activate the Apple developer account to apply for real machine debugging. After Xcode is cracked, it can work with the jailbroken iPhone or iPad to develop and debug without the official certificate! Currently, this test is applicable to Xcode 3.2.5 of the latest iOS 4.2 SDK/iOS 4.2.1 SDK! Of course, Xcode 3.1.2 for iOS 3.2.2/iOS 4.1 SDK is also compatible.

Generate a self-signed development certificate

Start the certificate chain management tool application-> utility-> key string access) to create a certificate

1. set the Certificate Name To iPhone Developer. This name must be the same as the certificate name used when XCode compiles the signature, which will be mentioned below). Select the self-Signed root certificate for the identity type, select S/MIME (email) as the certificate type, and check the options that overwrite these default values.

Choose to continue creating the self-signed certificate

2. Set the validity period of the certificate to 365 days or longer)

3. Enter user information

4. Select the key size and algorithm 2048 bits and use the RSA Algorithm)

5. Set the key Extension function to select the signature function and the code signature function)

6. Disable basic constraint Extension

7. Set the name extension for the theme device. Enter the email address RFC822.

8. Set the key string type to login type

At this point, the self-signed certificate has been created

Xcode cracking

Make sure that Xcode is disabled. On the command line terminal, copy and paste the following code:

 
 
  1. #!/bin/bash cd /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug-ins/iPhoneOS\ Build\   
  2.    System\ Support.xcplugin/Contents/MacOS/ dd if=iPhoneOS\ Build\ 
  3. System\ Support of=working bs=500 count=255 printf “\x8f\x2a\x00\x00″ >> working dd if=iPhoneOS\ Build\   
  4.    System\ Support of=working bs=1 skip=127504 seek=127504 /bin/mv -n iPhoneOS\ Build\ System\ Support iPhoneOS\ Build\   
  5.    System\ Support.original /bin/mv working iPhoneOS\ Build\ System\ Support chmod a+x iPhoneOS\ Build\ System\ Support  
  6.  

Copy and paste the following code to the command line terminal:

 
 
  1. mkdir /Developer/iphoneentitlements30 cd /Developer/iphoneentitlements30 curl -O 
  2. http://www.alexwhittemore.com/iphone/gen_entitlements.txt mv gen_entitlements.txt gen_entitlements.py chmod 777 
  3. gen_entitlements.py ./gen_entitlements.py 

After the script is executed, modify the "/Developer/Platforms/iPhoneOS. platform/Info. plist" file and make the following changes:

Add the following two items (inform the project to compile without a certificate ):

 
 
  1. PROVISIONING_PROFILE_ALLOWED = NO
  2. PROVISIONING_PROFILE_REQUIRED = NO
  3.  
  4. There are two items to be modified, as shown below:
  5.  
  6. <Key> ARCHS </key>
  7. <String> armv6 </string>
  8. <Key> CODE_SIGN_CONTEXT_CLASS </key>
  9. <String> XCiPhoneOSCodeSignContext </string>
  10. <Key> COMPRESS_PNG_FILES </key>
  11. <String> YES </string>
  12. <Key> DEBUG_INFORMATION_FORMAT </key>
  13. <String> dwarf-with-dsym </string>
  14. <Key> EMBEDDED_PROFILE_NAME </key>
  15. <String> embedded. mobileprovision </string>
  16. <Key> INFOPLIST_OUTPUT_FORMAT </key>
  17. <String> binary </string>
  18. <Key> NATIVE_ARCH </key>
  19. <String> armv6 </string>
  20. <Key> PLIST_FILE_OUTPUT_FORMAT </key>
  21. <String> binary </string>
  22. <Strong> <key> PROVISIONING_PROFILE_ALLOWED </key>
  23. <String> NO </string>
  24. <Key> PROVISIONING_PROFILE_REQUIRED </key>
  25. <String> NO </string> </strong>
  26. <Key> SDKROOT </key>
  27. <String> iphoneos2.2.1 </string>
  28. <Key> STRINGS_FILE_OUTPUT_ENCODING </key>
  29. <String> binary </string>
  30. <Key> CODE_SIGN_CONTEXT_CLASS </key>
  31. <String> XCiPhoneOSCodeSignContext </string>
  32. <Key> DEBUG_INFORMATION_FORMAT </key>
  33. <String> dwarf-with-dsym </string>
  34. <Key> EMBEDDED_PROFILE_NAME </key>
  35. <String> embedded. mobileprovision </string>
  36. <Key> SDKROOT </key>
  37. <String> iphoneos2.2.1 </string>
  38. <Strong> <key> PROVISIONING_PROFILE_ALLOWED </key>
  39. <String> NO </string>
  40. <Key> PROVISIONING_PROFILE_REQUIRED </key>
  41. <String> NO </string> </strong>

The bold part is the content to be added. Save.

Replace all "XCiPhoneOSCodeSignContext" in the file with "XCCodeSignContext", that is, remove the "iPhoneOS" in the middle ". If you do not perform this step, an error will be reported when compiling the Device Release version:

 
 
  1. Code Sign error: a valid provisioning profile matching the application’s Identifier ‘com.yourcompany.xxxx’ could not be found 

1. Use XCode to open your Project file, select the Build page from Project-> Edit Project Setting, find the Code Signing Identifty option, and set the signature to iPhone Developer.

2. Find the xxx-Info.plist file for your project and add the "SignerIdentity" item with the value of "Apple iPhone OS Application Signing". Save. [When I added this step for compilation, there was always an error. If I didn't add it, I don't know why.]

Complete Xcode cracking or, more accurately, configuration!

Xcode real machine debugging

Connect your iPhone to your computer. In Xcode Window-> Organizer, your iPhone will be detected. check that the iPhone and your Xcode are properly recognized and exit Organizer. Select "iPhone Device-4.2 | Release" as the compiling environment and click "Build and Go ", during this period, let's select the signature certificate, click "allow", and then wait for your iPad/iPhone screen to light up.

Your program will be automatically downloaded to your iPhone for debugging.

Xcode upgrade cracking

If you have upgraded to 3.2.5 In the original Xcode version and cracked it before, you only need to perform the following steps:

Add the following two items (inform the project to compile without a certificate ):

 
 
  1. PROVISIONING_PROFILE_ALLOWED = NO 
  2. PROVISIONING_PROFILE_REQUIRED = NO 

Replace all "XCiPhoneOSCodeSignContext" in the file with "XCCodeSignContext", that is, remove the "iPhoneOS" in the middle ". If you do not perform this step, an error will be reported when compiling the Device Release version:

 
 
  1. Code Sign error: a valid provisioning profile matching the application’s Identifier ‘com.yourcompany.xxxx’ could not be found 

Summary:XCodeFreeCertificateThe development environment has been introduced. I hope this article will help you !!!

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.