iOS development-the role of Info.plist and PCH files

Source: Internet
Author: User

iOS development-the role of Info.plist and PCH files

1. The role of Info.plist and PCH files

2. Common use of UIApplication

3. Proxy method for Appdelegate

4. The relationship between UIApplication, Appdelegate, UIWindow, Uiviewcontroller

5. Full boot process for iOS programs

﹣info.plist file ﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣ I'm a split line ﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣

Bundle Display Name (previous version) bundle name (new)
This is the software name, modify the text displayed after installation here is the software name

Bundle identifier
This is the only indication of the software, if there is the same software will conflict

Bundle versions string, short and bundle version
This is the version number of the software, if the Update software, published to AppStore will strictly abide by the version number of the rules

Main Storyboard File Base name
This is the main storyboard of the software.

Supported interface Orientations
This is the direction of the software screen this is an array, and the following three items are listed separately

Device Orientation
Portrait Vertical Screen
Upside down Upside down
Landscape left Sideways
Landscape Right Sideways

As long as this is checked, info.plist inside the supported interface orientations will change


﹣PCH file ﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣ I'm a split line ﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣﹣

Apple officially removed the PCH from Xcode6, which can speed up compilation for trivial header file references
So, if you need a PCH file, you have to add it manually

1. Create PCH File

2. Configuring PCH Files

Configuration
Note the true path of the PCH file, after you enter $ (srcroot)/xx.pch, compare the actual path to the configured path

3. The role of PCH files
The contents of the PCH header file can be shared and accessed by all other source files in the project
So:
1. Store some global macros (macros that are used throughout the project)
2. Used to include all header files (header files that are used throughout the project)
3. Can automatically open or close the output function of the log

/** *  Debug phase, there must be debug *  release phase, automatically delete debug *   * to  determine if there is Debug. Smart Add Delete nslog */#ifdef debug#define cwllog (...) NSLog (__va_args__) #else # define Cwllog (...) #endif



4. Anything that OC needs to be added to

All content in the #ifdef __objc__//can only be used in. m files or in. mm Files #endif

iOS development-the role of Info.plist and PCH files

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.