Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where do I set my company name?

Tags:

xcode

in Xcode 4 GM seed:

in the navigation pane (far left side), select the project (top item).

Expand the Utilities pane (at window top-right, far right button in the 3-button "View" group).

In the "Project Document" section is the "Organization" text field (File Inspection view, second section from top).


By default, Xcode inserts a company name something similar to the following in all new source files (.m .h etc):

Copyright (c) 2009 MyCompanyName. All rights reserved.

Changing this reference is as simple as entering the following from within a terminal window, replacing “YourNameHere” with the text you prefer. Also, make sure this is all entered on one line in the terminal.

defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions '{ORGANIZATIONNAME="YourNameHere";}'

OR

you could even go to ~/Library/Preferences and double-click com.apple.Xcode.plist and use the handy-dandy plist editor to set this and a whole bunch of other interesting defaults not covered by the Xcode or IB preference panels.

OR

@slf answer on this question shows an improved way to achieve this in Xcode 4 (Pasted below)

in the navigation pane (far left side), select the project (top item).

Expand the Utilities pane (at window top-right, far right button in the 3-button "View" group).

In the "Project Document" section is the "Organization" text field (File Inspection view, second section from top).


In xCode 7.3 (edit: till 11.3.1) just select top project file and Look in Utilities on Left pane

xCode


I have tested on the Xcode 4.2 Beta 7 (iOS 5.0).

It seems like the Xcode does not retrieve ORGANIZATIONNAME from neither

defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions
'{ORGANIZATIONNAME="YourNameHere";}'

nor

~/Library/Preferences/com.apple.Xcode.plist

The proper solution is to update your name & company name in Address Book.

enter image description here

Then you can try by creating any new Xcode project:

enter image description here


Or you can set the company name in your address card in the Mac OS X address book application. Worked for me (SL, Xcode 3.2.2)


Adding to what SLF wrote above:

in Xcode 4 GM seed:

in the navigation pane (far left side), select the project (top item).

Expand the Utilities pane (at window top-right, far right button in the 3-button "View" group).

In the "Project Document" section is the "Organization" text field (File Inspection view, second section from top).

But there is a small catch:

Changing the Organization name as SLF described didn't set the project file as modified and no changes where saved.

You need to make a small change to the project, like adding a group after you change the organization name, this will cause Xcode 4 to save the file.

Also if you are working on a workspace, you need to make the change for each project.

Tested at XCode 4.0.2


If you want change __MyCompanyName__ in Xcode 4, you can try the following command.

defaults write com.apple.dt.Xcode PBXCustomTemplateMacroDefinitions '{ORGANIZATIONNAME="YourNameHere";}'

Carefully, this writes in the domain, com.apple.dt.Xcode, not com.apple.Xcode

I only test on Xcode 4 pre3 and it works.