<p>How would I change the initial templates created by Xcode when creating a new Cocoa Class.</p>

<p>I am referring to the comments and class name created when using Xcode's new class wizard.</p>

[{'answer_id': 33743, 'author': 'Chris Hanson', 'author_id': 714, 'author_profile': 'https://Stackoverflow.com/users/714', 'pm_score': 8, 'selected': True, 'text': "<p>You wouldn't change the existing templates.  In other words, don't <em>modify</em> anything under the <code>/Developer</code> hierarchy (or wherever you installed your developer tools).</p>\n\n<p>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 <code>Library/Application Support</code> folder, specifically:</p>\n\n<ul>\n<li>File templates: <code>~/Library/Application Support/Developer/Shared/Xcode/File Templates/</code></li>\n<li>Target templates: <code>~/Library/Application Support/Developer/Shared/Xcode/Target Templates/</code></li>\n<li>Project templates: <code>~/Library/Application Support/Developer/Shared/Xcode/Project Templates/</code></li>\n</ul>\n\n<p>That way they won't be overwritten when you install new developer tools, and you can tweak them to your heart's content.</p>\n\n<p><strong>Update</strong>\nFor newer versions of Xcode the updated path will be:\n<code>~/Library/Developer/Xcode/Templates/File Templates/Source</code></p>\n"}, {'answer_id': 33789, 'author': 'Barry Wark', 'author_id': 2140, 'author_profile': 'https://Stackoverflow.com/users/2140', 'pm_score': 5, 'selected': False, 'text': '<p>Xcode uses template files for file and project templates and does variable expansion in both at creation time.</p>\n\n<p>Xcode 3.0 templates can be found in [Dev Installation]/Library/Xcode/, likely /Developer/Library/Xcode. If you want to modify these templates or add your own, use the following directories to save your new/modified templates so that they are not wiped out by future Developer Tool upgrades:</p>\n\n<ul>\n<li>File templates:\n~/Library/Developer/Shared/Xcode/File\nTemplates/ </li>\n<li>Target templates:\n~/Library/Developer/Shared/Xcode/Target\nTemplates/ </li>\n<li>Project templates:\n~/Library/Developer/Shared/Xcode/Project\nTemplates/</li>\n</ul>\n\n<p>I think that you can also use the /Library/Developer/Shared/Xcode/[File|Target|Project] Templates/ directory for templates shared by all users.</p>\n\n<p>If you just want to change the <strong>MyCompanyName</strong> in the templates, the following command line will do the trick:</p>\n\n<pre><code>defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions \'{ "ORGANIZATIONNAME" = "NewCompanyName";}\'\n</code></pre>\n\n<p>A  good tutorial on writing file templates is <a href="http://www.macresearch.org/custom_xcode_templates" rel="noreferrer">here</a> [MacResearch.org].</p>\n'}, {'answer_id': 8756703, 'author': 'v01pe', 'author_id': 1050264, 'author_profile': 'https://Stackoverflow.com/users/1050264', 'pm_score': 4, 'selected': False, 'text': "<p>In Xcode 4 and Xcode 5 the <strong>user</strong> file templates can be placed at:<br/>\n<code>~/Library/Developer/Xcode/Templates/[Category]</code></p>\n\n<p>[Category] can be used to categorize your templates (choose a name of your choise)</p>\n\n<p>If the folder doesn't exist already, create it!</p>\n"}, {'answer_id': 12180616, 'author': 'Manav', 'author_id': 141220, 'author_profile': 'https://Stackoverflow.com/users/141220', 'pm_score': 1, 'selected': False, 'text': '<p>For Xcode 4.4, none of the previously mentioned methods work. <a href="https://gist.github.com/3513608" rel="nofollow">This gist</a> provides a partial hacky solution. Please fork and enhance if you know a better way.</p>\n'}, {'answer_id': 13348614, 'author': 'Denis Kutlubaev', 'author_id': 751641, 'author_profile': 'https://Stackoverflow.com/users/751641', 'pm_score': -1, 'selected': False, 'text': "<p>In XCode 4.5 right click on project, click Show File Inspector, then change Organization name in the file inspector's second tab (Project Document group)</p>\n"}, {'answer_id': 20341689, 'author': 'tanyanzhi', 'author_id': 2396643, 'author_profile': 'https://Stackoverflow.com/users/2396643', 'pm_score': 3, 'selected': False, 'text': '<p>In xcode 5.0.1:</p>\n\n<p>1.Go->Applications</p>\n\n<p>2.right click "xcode" application</p>\n\n<p>3.chose "Show Package Contents"</p>\n\n<p>4.contents/Developer/Library/Xcode/Templates</p>\n'}, {'answer_id': 25548430, 'author': 'Alex Cio', 'author_id': 1141395, 'author_profile': 'https://Stackoverflow.com/users/1141395', 'pm_score': 1, 'selected': False, 'text': '<p>Right click on xCode and select <strong>Show Package contents</strong>, then go to <code>contents/Developer/Library/Xcode/Templates</code>. Here you can find the templates for all programming languages.</p>\n\n<p>Here some visualization:</p>\n\n<hr>\n\n<p><img src="https://i.stack.imgur.com/Po1Tv.png" alt="enter image description here"></p>\n\n<hr>\n\n<p><img src="https://i.stack.imgur.com/7JpP9.png" alt="enter image description here"></p>\n'}, {'answer_id': 27620151, 'author': 'pconcepcion', 'author_id': 574353, 'author_profile': 'https://Stackoverflow.com/users/574353', 'pm_score': 6, 'selected': False, 'text': "<p>This may be useful for somebody:</p>\n\n<p>As for <strong>XCode 6</strong> to <strong>XCode 9</strong> the file templates are in:</p>\n\n<pre><code>/Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File Templates/Source\n</code></pre>\n\n<p><strong>Update:</strong>\nAs @carbo18 noted, it's proably better to create the directory <code>~/Library/Developer/Xcode/Templates/File Templates/Source</code> and put your custom templates there. The best way may be to use as base one of the ones in <code>/Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/File Templates/Source</code></p>\n"}, {'answer_id': 34561066, 'author': 'carbo18', 'author_id': 2782573, 'author_profile': 'https://Stackoverflow.com/users/2782573', 'pm_score': 3, 'selected': False, 'text': '<p>As of Xcode 7</p>\n\n<ul>\n<li>File templates: <code>~/Library/Developer/Xcode/Templates/File Templates</code> </li>\n<li>Project templates: <code>~/Library/Developer/Xcode/Templates/Project Templates</code></li>\n</ul>\n\n<p>For example if I place a <code>Empty Application.xctemplate</code> in <code>~/Library/Developer/Xcode/Templates/Project Templates/Application</code></p>\n\n<p>It will appear in the template dialog as\n<a href="https://i.stack.imgur.com/n4XPj.png" rel="noreferrer"><img src="https://i.stack.imgur.com/n4XPj.png" alt="Template Dialog"></a></p>\n'}, {'answer_id': 41449140, 'author': 'ChrisJF', 'author_id': 156210, 'author_profile': 'https://Stackoverflow.com/users/156210', 'pm_score': 2, 'selected': False, 'text': '<p>If you are simply looking to change the <strong>Author Name</strong> and <strong>Organization</strong> see <a href="http://stackoverflow.com/a/41449069/156210">this answer</a>.</p>\n<p>It\'s much easier than modifying the templates.</p>\n'}]
['https://Stackoverflow.com/questions/33720', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3467/']