Note: [Small white learning iOS programming] is this small white based on a video learning iOS programming process notes record, content is easier, master do not spray.
Turn to please indicate the original blog address: http://blog.csdn.net/fan_yufan/article/details/45955537
Common settings for files commonly found in Project 1 info.plist
- After building a project, you will see a "project name-info.plist" file under the supporting Files folder, which is very important for the project to do some run-time configuration, so it cannot be deleted.
- In the project created by the older version of Xcode, the profile name is called "Info.plist"
- Other plist files in the project cannot have the word "Info", or they will be mistaken for the "info.plist" that is very important in the legend.
- There is also a infoplist.strings file in the project that is related to localization of info.plist files
2 Info.plist
- Common Properties (the red part is the key you see when you open it with a text editor)
Localiztion native Development Region (cfbundledevelopmentregion)-Localization related
Bundle Display Name (cfbundledisplayname)-a program that displays the names after installation, limited to 10-12 characters, and if exceeded, will be displayed abbreviated names
Icon file (cfbundleiconfile)-app icons name, typically icon.png
Bundle version (cfbundleversion)-The version number of the application, which needs to be increased each time a new version is posted to the App Store
Main Storyboard file base name (nsmainstoryboardfile)-the name of the primary storyboard
Bundle identifier (cfbundleidentifier)-Unique identification of the project, deployed to the real machine
3 PCH File
The project's supporting files folder has a "project name-prefix.pch" file, which is also a header file
The contents of the PCH header file can be shared and accessed by all other source files in the project
In general, some global macros are defined in the PCH file
Add the following preprocessing directives in the PCH file, and then use the log (...) in your project. To output the log information, the NSLog statement can be removed at once when the application is published (debug mode is defined)
#ifdef DEBUG#define Log(...) NSLog(__VA_ARGS__)#else#define Log(...) /* */#endif
//在if里面定义或者引用的东西 只能.m .mm文件用。如果是定义在if外面,则表示在所有的文件中都可以使用。故要慎重。#ifdef __OBJC__ #import <UIKit/UIKit.h> #import <Foundation/Foundation.h>#endif
[Small white learn iOS programming 05] Common files in the app