Xcode instruction set, xcode Instruction Set

Source: Internet
Author: User

Xcode instruction set, xcode Instruction Set

Currently, ios provides the following instruction sets:

I386: mac
Armv6: iPhone, iPhone E2, iPhone 3G, first generation and second generation iPod Touch
Armv7: iPhone 3GS, iPhone 4, iPhone 4S, iPod 3G/4G/5G, iPad, iPad 2, iPad 3, iPad Mini
Armv7s: iPhone5, iPhone5C, and iPad 4
ARMv8/ARM64: iPhone 6 (Plus), iPhone 5S, iPad Air (2), Retina iPad Mini (2, 3)

The machine's support for instruction sets is backward compatible, so armv7 instruction sets can run on iphone5S, but the efficiency is not that high ~

**************************************** ********************************

Architecture: the instruction set you want to support.

Valid ubuntures: indicates the instruction set to be compiled.

Build Active Architecture Only: whether to compile Only applicable instruction sets.

**************************************** ********************************

At the beginning of 2014, there are still quite a few 4 and 4 s users, and there are almost no iPhone 3 and other machines. Therefore, our instruction set must be at least based on armv7.

Therefore, the Architecture value is armv7 armv7s arm64.

PS: When you select arm64, you must support a minimum of 5.1.1:

Convert Your App to a 64-Bit Binary After Updating It for iOS 7

Xcode 5.0.1 can build your app with both 32-bit and 64-bit binaries encoded ded. this combined binary requires a minimum deployment target of iOS 5.1.1 or later. the 64-bit binary runs only on 64-bit devices running iOS 7.0.3 and later. if you have an existing app, you shoshould first update your app for iOS 7 and then port it to run on 64-bit processors. by updating it first for iOS 7, you can remove deprecated code paths and use modern practices. if you're creating a new app, target iOS 7 and compile 32-bit and 64-bit versions of your app.

The architecture for 64-bit apps on iOS is almost identical to the architecture for OS X apps, making it easy to create a common code base that runs in both operating systems. converting a Cocoa Touch app to 64-bit follows a similar transition process as the one for Cocoa apps on OS X. pointers and some common C types change from 32 bits to 64 bits. code that relies onNSIntegerAndCGFloatTypes needs to be carefully examined.

Start by building the app for the 64-bit runtime, fixing any warnings that occur as well as searching your code for specific 64-bit issues. For example:

  • Make sure all function CILS have a proper prototype.

  • Avoid truncating 64-bit values by accidentally assigning them to a 32-bit data type.

  • Ensure that calculations are saved med correctly in the 64-bit version of your app.

  • Create data structures whose layouts are identical in the 32-bit and 64-bit versions of your app (such as when you write a data file to iCloud ).

1. If you want your app to run in the most efficient way on each machine, you need to change Build Active Architecture Only to NO. Valid ubuntures selects the corresponding Instruction Set: armv7 armv7s arm64. This will compile the corresponding code for each instruction set. Therefore, the size of the final ipa has basically tripled, and the Release version must be NO.

2. If you want to minimize the app volume, you should select Valid ubuntures as armv7 at the current stage. In this way, it doesn't matter if you select YES or NO to Build Active Architecture.


64-bit support


Apple forced 64-bit support in next February


For 64-bit support, we can set ubuntures to Standard ubuntures. On the latest Xcode 6, it includes armv7 and arm64.

Make the App support the basic steps of 32-bit and 64-bit

1. Make sure that the Xcode version is greater than or equal to 5.0.1.

2. Update project settings, minimum deployment target> = 5.1.1

3. Change ubuntures to Standard ubuntures (include 64-bit)

4. Run the test code to compile warnings and errors. Compare the 64-Bit Transition Guide for Cocoa Touch in this document or the official documentation to make changes to the relevant areas. (The compiler cannot tell us everything)

5. Test on a real 64-bit machine.

6. use Instruments to view memory usage problems.

Major changes in 64-bit

The 64-bit runtime environment and 32-bit runtime environment have the following two differences:

Changes in data types

Changes in method calls

Changes in data types


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.