How would I change the initial templates created by Xcode when creating a new Cocoa Class.
I am referring to the comments and class name created when using Xcode’s new class wizard.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You wouldn’t change the existing templates. In other words, don’t modify anything under the
/Developerhierarchy (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 Supportfolder, specifically:~/Library/Application Support/Developer/Shared/Xcode/File Templates/~/Library/Application Support/Developer/Shared/Xcode/Target 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