Xcode has a habit of putting all kinds of (redundant) information at the top of each code file it creates, containing copyright notices, class names, project names and client names. Like it or not, once you create a new class "A", then refactor it to be called "B", the information is wrong already. The comments will keep saying that this is "A.h" or "A.m". In addition, if you reuse classes from one project in a next, it will also state the wrong project name.
//
// A.h
// ProjectName
//
// Created by Author on 19-06-11.
// Copyright 2011 CompanyName. All rights reserved.
//
There must be a reason there aren't many people complaining about this. What is your trick to keep the header comments up to date? Is there a tool that auto-corrects it all? Is there a hidden setting?
Cheers, EP.
you can try: System Preferences --> Users & Groups --> choose current User --> unlock -->right tap current User --> Advanced option --> change you full name & above account name to your want, save ,that is ok! I get it from How does Xcode know who the the project was "created by"?
There may be a way to update your comments but it will be tricky.
As far a customizing the template, this is not as bad. it is just a text file located in
/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/File Templates/Cocoa Touch/
Don't edit the files here, they will get overwritten when you update, or reinstall xcode. Place your custom templates here, in your home directory.
~/Library/Developer/Xcode/Templates/File Templates/
High Order Bit explains further.
Short Answer: Use SCM Commit Hooks (git example, svn example, cvs example)
Reason: Well, you can be rest assured that XCode will not do it. What XCode can do is attach itself to version control system. Its fairly simple to do using commit hooks that most SCMs support. They fire up before/after the commit/push so that source code is updated. You can even send automated emails when commiting etc.
Since GIT is the most popular one in my opinion these days, see this article.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With