Precompiled header files and App development process compilation are added to the app development process.
Wait until the pre-compiled header file is added.
Xcode has created a template project for us. It's great! However, the problem is not satisfactory:
This is the initial file directory for a new project. Almost all files are under the same level directory. This is a nightmare as the number of project files increases rapidly. Therefore, we need to sort out the file structure, which is also a preliminary project architecture.
Note that the Xcode base Directory should contain a "Supporting Files" folder where the main. m file is located, and the two storyboard Files are located in the base directory. But not in a physical directory. Because Xcode's file directory contains a logical directory structure, all files can be in the same level directory.
In actual project management, we recommend that you avoid this situation as much as possible, so that the physical directory of the file is consistent with the logical directory, so that you can right-click to view the file in the Finder.
It's easy. You just need to create a new folder "Supporting Files" in the physical directory and drag the Info. plist and main. m Files into it:
Return to Xcode and the following occurs:
Right-click the Info. plist file, the Supporting Files folder, and the main. m file to Delete.
Right-click the base folder, "Add Files to base", Add the Supporting Files folder, and drag the Supporting Files folder to the appropriate index location:
Now, you have finished sorting out the directories that support files.
Note:
1. Because the plist file is moved, the project general configuration interface cannot be parsed in the Identity column. You only need to re-select the plist file.
2. You need to reconfigure the path of the plist file on the build settings interface. If Xcode does not automatically reconfigure the file
Add pre-compiled header files
Pre-compiled header files are generally used to reference third-party frameworks and library header files. You can also reference and store global macro-defined header files for global use.
Right-click "Supporting Files"-> New File and select the pch File, for example:
Select Target: base before confirmation.
Switch to the Build Settings interface, search for: prefix header in the search bar, and double-click the target column and enter $ (SRCROOT)/base/Supporting Files/PrefixHeader. pch, for example:
At this point, the pre-compiled header file is added, and the pre-compiled header file will be recorded later.