IPhone generation CPU architecture and xcode support for iOS SDK version and CPU architecture

Source: Internet
Author: User

The original iPhone, iPhone 3G, and iPod Touch of the first and second generations only support armv6 CPU instruction sets. However, with the iPhone 3gs
With the release of this new product, Apple began to support the new instruction set armv7. All iPhone 5 devices support armv7s and are backward compatible. To maintain backward compatibility and support legacy devices and instruction sets, Apple supports fat binary codes (fat binaries), that is, more platform architectures in executable files.


However, it is not a long time. With the release of xcode 4.5, the latest version of xcode, Apple announced that it would stop supporting armv6 instruction sets and force developers to abandon IOS 4.2.1 and earlier versions that support armv6 instruction sets. In my opinion, I still think that the enterprise market for supporting old devices must be longer than the public market, so I didn't want to give up 4.2.1 or earlier versions. After a period of exploration, we were lucky to find some ways to compile the armv6 Instruction Set code through simple modification and configuration.
Here are some of our methods for your reference:

  • Find a copy of the old version of xcode. 4.4.1 is recommended. If you are a participant in the IOS Developer Program, you can download it directly from mongo.apple.com/ios. If not, ask Baidu
  • Decompress xcode and copy SDK contents/developer/platforms/iphoneos. Platform/developer/sdks/iphoneos5.1.sdk/
  • And then port the copied SDK to xcode 4.5. Example: Contents/developer/platforms/iPhone OS. Platform/developer/sdks/
  • Open the project in xcode and click "build Settings" to view the "build Settings" attribute. A new option "base SDK" is displayed: IOS 5.0 is selected.
  • Under build settings, find valid ubuntures. Change armv7s to armv6
  • Now we can compile armv6, but it cannot run on any armv6 device, because the target is incorrect. Click the info option to modify the target, such as IOS 3.0 or earlier versions. You won't find 3.0 in the down menu.


The above is all the practices, but it is not perfect. For example, you cannot use the new features of iOS 6 or the new armv7s instruction set. Of course, if your xcode is downloaded through the Mac appstore and upgraded to the new version, you need to add the SDK again.

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.