Where do I set my company name?

Xcode

Xcode Problem Overview


When creating new source files xcode adds comments with your name and company name.

Where do I set my company name for xcode (not the project).

Xcode Solutions


Solution 1 - 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).

Solution 2 - Xcode

> 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).

Solution 3 - Xcode

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

xCode

Solution 4 - 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

Solution 5 - Xcode

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)

Solution 6 - Xcode

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

Solution 7 - Xcode

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.

Solution 8 - Xcode

Simply just go to appName-Info.plist and add a field "Copyright(human-readable)" : nameOfDeveloper or companyName. enter image description here:

Solution 9 - Xcode

In XCode 5 you can select company name on project creation. If you would like to change company name for existing project, then:

  1. Open .xcodeproj in Finder by selection "Show package contents"
  2. Open project.pbxproj in TextEdit
  3. Replace current value of ORGANIZATIONNAME with desired one.

Solution 10 - Xcode

There's more confusion about this than there should be. I clarified here: https://stackoverflow.com/a/9793899/1273966 I'll do the same in this thread.

If the organisation name is blank in the project document (described above) the company name is pulled from the 'me' entry in your address book.

If you enter an organisation name in the project document as described above, it will override the company name in the address book. IE: You can override your company name on a per project basis. Pretty clever, but obviously has a lot of people confused.

Solution 11 - Xcode

open up the xcode

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).

there you can set the name.

Solution 12 - Xcode

In XCode 4, open up your project. Select the top-most item in the Project Navigator (MyProjectName, 1 target, iOS SDK 4.3 -- or whatever). Open up the file inspector (View->Utilities). In the Project Document section, you should see an "Organization" line. Edit that, and new files that you create will display the new organization name. This is a project setting, hence you'll have to do it for every project.

The Organization Name field is one that's shown in the New Project wizard. Its default value is the value that it was on the previously open project.

Solution 13 - Xcode

It looks like the final version of Xcode 4 is not respecting the ORGANIZATIONNAME setting (either the old one, or the new one with com.apple.dt.Xcode. This sucks for me, because I have my company name in my address card, but I'm not doing Xcode work for my company. Thus, I don't want my actual company name to get inserted in my source files. I want the value I set for ORGANIZATIONNAME.

Update: It looks like it partially works. I had shutdown Xcode before setting the value, then I restarted it, and created a new project. I saw that it was still using my company name from my Address Book card, and not ORGANIZATIONNAME. But then I created some new files in the project (File>New File...) and when they were created, they DID have the value from ORGANIZATIONAME. So, it looks like the code there is at least two bits of code that fill in the file template with the company name, and they are pulling from different locations.

Solution 14 - Xcode

You can try remove app-info.plist and try to input app-info.plist in your project.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionTheLearnerView Question on Stackoverflow
Solution 1 - XcodeslfView Answer on Stackoverflow
Solution 2 - XcodeVoodooChildView Answer on Stackoverflow
Solution 3 - XcodeWINSergeyView Answer on Stackoverflow
Solution 4 - XcodeObjective CiaoView Answer on Stackoverflow
Solution 5 - XcodeflorianbuergerView Answer on Stackoverflow
Solution 6 - XcodeSergio NachtView Answer on Stackoverflow
Solution 7 - XcodeiCharlieView Answer on Stackoverflow
Solution 8 - XcoderahulchonaView Answer on Stackoverflow
Solution 9 - XcodeAlexView Answer on Stackoverflow
Solution 10 - XcodeKorutech App SolutionsView Answer on Stackoverflow
Solution 11 - XcodechetanView Answer on Stackoverflow
Solution 12 - XcodeAndrewSView Answer on Stackoverflow
Solution 13 - XcodeJoey GibsonView Answer on Stackoverflow
Solution 14 - XcodekilldosView Answer on Stackoverflow