Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove copyright in Xcode generated source code

Tags:

xcode

xcode4

Is there any way to completely remove the comment with the copyright notice when creating a new source code file with Xcode 4?

Insted of:

//
//  MainView.h
//  ProjectName
//
//  Created by First Last Name on 1/2/34.
//  Copyright (c) 2012 Company Name. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface MainView : UIView

@end

I'd like to have:

#import <UIKit/UIKit.h>

@interface MainView : UIView

@end
like image 304
rid Avatar asked Apr 05 '12 06:04

rid


People also ask

How do I change the copyright code in Xcode?

You can change the copyright template in Xcode here: Project Navigator -> File Inspector -> "Organization".

How do I change the author name in Xcode?

Open up the address book and go to your user account, and edit your name (the large, bold line at the top). (Address Book is by default the first app in your Applications folder.)


1 Answers

The safest way to do what you want is to create a custom file template. Make a copy of Apple's file template, open the header file, and remove the introductory comments. More detailed information on creating custom file templates is in the following article:

Creating Custom Xcode 4 File Templates

like image 169
Swift Dev Journal Avatar answered Nov 15 '22 07:11

Swift Dev Journal