IOS Development Learning 37 architecture and iphone version corresponding relationship

Source: Internet
Author: User

Brief introduction

ARM is the processor that is the most occupied processor on a mobile device.
ARMv6, ARMv7, armv7s, and arm64 are all instruction sets for ARM processors. Usually the instructions are backwards compatible. When the emulator is running, the iOS emulator runs the x86 instruction set. The arm instruction set is executed only on the real machine.

If an error occurs:
"objc_class$_xx filename", referenced from:
Linker command failed with exit code 1 (use-v to see invocation)

To set:

Build Active Architecture only

This property is set to Yes, in order to debug the compiler faster, it only compiles the current version of architecture, so will be error compiled file, error ("objc_class$_ Zbarreaderviewcontroller ", referenced from:)
When set to No, all versions are compiled.

Equipment corresponding to the architecture:
Architecture version
ARMv6 Iphone,iphone 2g/3g,
IPod 1g/2g
ARMv7 IPhone 3gs,iphone4,iphone 4s,
Ipad,ipad2,ipad3 (the New ipad), ipad Mini,
IPod Touch 3g,ipod TOUCH4
armv7s IPhone5, IPHONE5C,
IPAD4,
IPod5
Arm64 Iphone5s,iphone6,iphone6 Plus,
ipad air,ipad mini2 (ipad mini with Retina Display)

Starting with XCode45, the armv6 instruction set is no longer supported.

Xcode's achitectures settings architectures:

Selecting the instruction set supported by the target build package means that the generated package contains the corresponding instruction set code. In principle, the target number is chosen, resulting in larger packages.

Valid architectures:

Valid architectures limits the range of instruction sets that may be supported.

The resulting package is the intersection of valid architectures and architectures.

Build Active Architecture only:

Whether to compile only the set of instructions supported by the currently connected device.

The set of instructions supported in the build generated package is closely related to the three option settings above. Such as:
Now Xcode connect new IPad (support ARMv7) settings:

Options value
Build Active Architecture only YES
Architectures ARMv7 armv7s arm64
Validarchitectures ARMv7 armv7s arm64
This generates the package support instruction set ARMv7

The problem can occur if the following conditions are true:

Options value
Build Active Architecture only YES
Architectures ARMv7 armv7s arm64
Validarchitectures ARMv6 armv7s arm64
This generates the package support instruction set Compile error: No architectures to compile ...

Build Active Architecture Only is generally set to Yes,release at Debug.

Welcome attention [Lone Solitary no sword]blog:
(Http://blog.csdn.net/xundh/%20%22%E7%8B%AC%E5%AD%A4%E6%B2%A1%E5%89%91%22%20%E7%9A%84blog)

IOS Development Learning 37 architecture and iphone version corresponding relationship

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.