Change templates in Xcode

You wouldn’t change the existing templates. In other words, don’t modify anything under the /Developer hierarchy (or wherever you installed your developer tools).

Instead, clone the templates you want to have customized variants of. Then change their names and the information in them. Finally, put them in the appropriate location in your account’s Library/Application Support folder, specifically:

  • File templates: ~/Library/Application Support/Developer/Shared/Xcode/File Templates/
  • Target templates: ~/Library/Application Support/Developer/Shared/Xcode/Target Templates/
  • Project templates: ~/Library/Application Support/Developer/Shared/Xcode/Project Templates/

That way they won’t be overwritten when you install new developer tools, and you can tweak them to your heart’s content.

Update
For newer versions of Xcode the updated path will be:
~/Library/Developer/Xcode/Templates/File Templates/Source

Leave a Comment