Remove Xcode's File Header Comments

Remove Xcode's File Header Comments

Summary

Skip to how to do it

When I started iOS development, I thought the auto-generated comments at the top of all newly created files in Xcode was neat. Then, I went through a phase where I wanted something more custom. Now, I just delete them 🙃.

Why? The header comments don’t add much to a source code file (unless there is an attribution or legal reason). Mostly, they just end up cluttering source files and force you to scroll down before starting to read the code.

Why automate this? I like the philosophy of applying automation or a time-saving process to something I find myself doing manually over and over again — Even if it saves only a few seconds each time, like in this case. Hey, that time adds up 😉.

The below steps uncover a bit of Xcode dark magic to create a new custom file template with no auto-generated comments.


Custom Template w/ No Header Comments


If you want to learn more, check out these related resources:


Feel free to reach out on Twitter — cheers!

rss facebook twitter github youtube mail spotify lastfm instagram linkedin google google-plus pinterest medium vimeo stackoverflow reddit quora quora