Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to set default name & company name on comments in Xcode?

When we add a new file,

In .h & .m file, there is always a comments/documentation section at top.

example.

//
//  SimpleGameAppDelegate.m
//  SimpleGame
//
//  Created by hbmac2 on 01/10/09.
//  Copyright __MyCompanyName__ 2009. All rights reserved.
//

Here, there is by default hbmac2 - is user name & MyComapnyName is also default.

Can't we set it like,

Created by Sagar -

HiddenBrains.com - by default?

Can we set any other comments to be there by default?

like image 423
Sagar Kothari Avatar asked Dec 01 '25 19:12

Sagar Kothari


2 Answers

Nall's answer is good, but you should know that in Snow Leopard XCode you can set the Organization name (the name used by the templates) in the General tab of project settings.

If you are working on only your own stuff, you should set it once via the other means. If you are working for clients you should use the per-project setting so a file always gets the right name as you switch between projects.

like image 163
Kendall Helmstetter Gelner Avatar answered Dec 04 '25 11:12

Kendall Helmstetter Gelner


1) In 3.0 and later, set your Company Name in your personal Address Book card. 2) In 3.2 and later, you can additionally have a per-project Company Name set in the Project's General tab in Get Info.

like image 42
cdespinosa Avatar answered Dec 04 '25 10:12

cdespinosa



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!