Precompiled header files and App development process compilation are added to the app development process.

Source: Internet
Author: User

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.

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.