A project template is an item that you select when you create a project, and Xcode generates a fixed-format project based on the selected entry.
- For example, if you want to create a command line project, select command lines Tool
How to modify a project template
- 1. In the application, locate Xcode, right-click "Show Package Contents"
- 2. Open the "/applications/xcode.app/contents/developer/library/xcode/templates/project templates/mac/application" folder
- Find all folders in the/application folder that correspond to the OS X application interface
- Modify Command line tool template
- Open the "command line tool.xctemplate" folder and find the corresponding "command line Tool template" one by one
- Opens "Templateinfo.plist file" discovery and "command line tool template" in the content corresponding
- Modify the contents of the "Templateinfo.plist file" and the content in Xcode will change as well.
- Attention:
- It's best to restart Xcode after you've changed
- If you find that you cannot modify it, you can drag the file to the desktop and then modify it, or modify the file's permissions before modifying it.
Modify the main file template
Modifying header information for a class
- Locate the class file template corresponding to the corresponding class. (Because the class was created manually after the project was created, rather than automatically created as the project was created, modifying the class file template and project template does not modify the same file)
- Open the/applications/xcode.app/contents/developer/library/xcode/templates File Templates/source/cocoa Class.xctemplate "folder
- Modify the. h/. m file in the directory and then OK
xcode-Project Template Modification