IOS Xcode Settings

Source: Internet
Author: User

Xcode Build Search paths


C + + header file Reference problem
Include <> reference header files under the class library path of the compiler
Include "" header file referencing the relative path of the project directory

The include is a compile instruction, and at compile time, the compiler replaces the relative path with an absolute path, so the absolute path of the header file = search path + relative path.

Xcode Build Settings search paths to set the searching path

Header Search Paths: Header file searching path settings

$ (srcroot) macros and $ (PROJECT_DIR) macros refer to the parent directory where xxx.xcodeproj resides

Example: referencing the project testdemo/scr/test.h header file,

Header Search paths add $ (srcroot), referenced as include "Scr/test.h"
If you add $ (srcroot)/scr in header Search paths, the header file reference refers directly to the include "Test.h"

If always search user Paths is set to Yes, the compiler first searches the directory under the User header search Paths path, in which case the include <string.h>,user header sear CH Paths The file in the search directory overwrites the system's header file (use the User header of search Paths for Paths you want searched for #include "..." and use the H Eader Search Paths for #include <...>. Of course, if you check the option to always Search user Paths, then #include <...> 'll also work for the user path S. < > is for frameworks--. A and. Frameworks "Libraries"--and it doesn ' t matter if it ' s a system framework, one  of your own or a 3rd party (like Boost.) "is for project headers--. h files," is a part of the set of files being compiled.)

Architectures

1, architectures (instruction set)-sets the set of instructions you want to support, there are currently several iOS instruction sets:

(1) ARMV6, supported machine iphone,iphone2,iphone3g and corresponding itouch 2,

(2) ARMV7, supported machines iphone4,iphone4s

(3) armv7s, supported machines IPHONE5,IPHONE5C

(4) arm64, supported machines: iphone5s

Machine Support for instruction sets is backwards compatible, so ARMV7 's instruction set can run on iphone5s, just not as efficient as

Valid architectures: Refers to the set of instructions that will be compiled.

Build Active Architecture only: Compiles only the currently applicable instruction set.  

Now is the beginning of 2014, in fact, 4 and 4S users are quite a lot, and iphone3 and other machines almost no, so our instruction set minimum must be based on ARMV7. Therefore, the value of the architecture is selected: ARMv7 armv7s ARM64 (arm64 need minimum support 5.1.1, this piece is not quite clear)

1, if you want your app to be able to run the most efficiently on each machine, you need to change build Active Architecture to No,valid Architectures Select the corresponding instruction set: ARMv7 armv7s arm64. This compiles the corresponding code for each instruction set, so the final IPA volume is roughly 3 times times larger. (You should do this if you don't care about the size of the app)  

2, if you want to keep the app volume to a minimum, you should choose valid architectures to ARMV7 at this stage so build Active Architecture It doesn't matter if you choose Yes or No.



The Base SDK ----The version of the SDK that is currently being compiled.

The IPhone OS Deployment Target----refers to which system version the compiled program will run on.

There are many versions of the IPhone OS, and many users are not upgrading to the latest version for a variety of reasons, which gives us developers trouble. As developers, we all want the software to have as many audiences as possible. How to make the software as adaptable as possible to the most iphone OS?

Here we should understand the iphone project's base SDK and iphone OS Deployment Target. The Base SDK refers to the version of the SDK that is currently being compiled. IPhone OS Deployment target refers to which system version the compiled program will run on.

The simpler and more useful statements are described below:

The Base SDK is set to the highest SDK version currently supported by Xcode, such as "iphone Device 4.0". iphone OS Deployment target is set to the lowest iphone OS version you support, such as "iphone OS 3.0".

Once this is set up, your program can run on devices from iphone OS 3.0 to 4.0. Of course, the premise is that you don't use 4.0 new APIs.

Project's settings are not inherited by targets by default and are inherited only if targets's settings are added to $ (inherited)

IOS Xcode Settings

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.