If you want to change the project name, folder names, .xib files, etc., you can simply double-click your project name at the top of the Project Navigator and edit it. Bring it all over again! If you are under version control, such as SVN, first transfer your working copy! Xcode knows about SVN and GIT, and after changing the project name, there will be no confirmation before Xcode changes your working directory extensively. If you want to undo the change, you will have to undo the working copy, and you are likely to lose any other uncommitted changes.
On the other hand, if you do not want to rename anything other than an executable, this is the full procedure in Xcode 4.1. The only modified file is the .xcodeproj file, as you would expect:
- Select "Clear" in the "Product" menu.
- Choose Project Navigator from the View menu> Navigators (or click the icon in the upper left).
- Click the triangle to see the files in your project, if necessary.
- At the bottom of the list, click the triangle to open the Products folder.
- You will see the name of the executable file; do not try to change it. Instead, click the Products folder to select it.
- Press the delete key to delete the Products folder and your old executable file name.
- Select the project at the top of the Navigator window.
- Immediately to the right of the Navigator, in the "Targets" section, click and change the name of the executable file.
- Go to the Summary tab and make sure the preference file ID is the one you want.
- Go your way through each item in the Product-> Build For menu, creating all the goals.
- Select "Product" - "Schema Management ...", select your schema and click the "Change ..." button.
- Select "Run" on the left side of the dialog box and pull out the "Executable files" menu, select "Other ..." and select a new executable file.
- Do the same for the profile to the left of the dialog box. Close the dialog box.
- Close Xcode, and then restart it by opening your project.
- You will see your new name at the bottom of the Navigator. Select it, right-click and select "New Group from Selection".
- Click on a new group and rename it to "Products."
- Glenn Fawcett
user984596 Oct 07 '11 at 19:53 2011-10-07 19:53
source share