Where do I set my company name?

前端 未结 14 1478
情深已故
情深已故 2020-12-02 06:05

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

14条回答
  •  抹茶落季
    2020-12-02 06:50

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

提交回复
热议问题