Manually add the. pch file after Xcode6,
Before Xcode6, Xcode automatically creates a project name-Prefix under the Supporting files folder. the pch file is also a header file. The content of the pch header file can be shared and accessed by all other source files in the project. Is a pre-compiled file. Xcode6 will not be created automatically and needs to be created manually.
Its role:
1. Store some global macros (macros used throughout the project)
2. Used to include all header files (header files used throughout the project)
Next, go to the topic --> manually create a. pch file.
Command + N, open the new file window: ios-> other-> PCH file, create a pch file
Click Next to create. pch. Remember to check the project name
After creation, add "project name/pch file name" to the path of the precompile header option in building setting, and set Precompile Prefix Header to YES. The pre-compiled pch file will be cached, compilation speed can be improved
Common problems:
1. The. pch file is not found.
Open Finder
Drag the. pch file to the project name (Music) folder.
Delete the red. pch file and add it again.
2. in. the macro definition defined in the pch file cannot be used in the entire project. If you typed those letters, it didn't prompt because it was created. the project name is not checked when the pch file is created.