How do I edit default C++ file templates for Xcode?

So, I want to change the files xcode make when I hit New > File > C++ file. I found out earlier you had to go /Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/ and find needed file templates here, but it seems like something changes and now I can't fint c and c++ templates here. Does anybody know where could it go?

Accepted Reply

Apple's C++ templates are at the following path:

/Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File Templates/MultiPlatform/Source

You should create a custom file template instead of editing the templates in the Xcode app bundle. Copy the C++ file template from Xcode to the path for custom templates.

~/Library/Developer/Xcode/Templates/File Templates

You'll probably want to create another folder to hold your custom templates.

The following article shows you how to create a custom file template for Xcode:

http://www.popcornomnom.com/create-custom-xcode-file-template-for-ios-and-macos-swift-5/

If that article is too complicated, do a search for creating custom Xcode file templates in a search engine. That will give you multiple articles on creating file templates.

  • Thank you. Don't know how I didn't see it for an hour..

Add a Comment

Replies

Apple's C++ templates are at the following path:

/Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File Templates/MultiPlatform/Source

You should create a custom file template instead of editing the templates in the Xcode app bundle. Copy the C++ file template from Xcode to the path for custom templates.

~/Library/Developer/Xcode/Templates/File Templates

You'll probably want to create another folder to hold your custom templates.

The following article shows you how to create a custom file template for Xcode:

http://www.popcornomnom.com/create-custom-xcode-file-template-for-ios-and-macos-swift-5/

If that article is too complicated, do a search for creating custom Xcode file templates in a search engine. That will give you multiple articles on creating file templates.

  • Thank you. Don't know how I didn't see it for an hour..

Add a Comment