If you want to change the project name, folder names, .xib files, etc., you can just click twice on the name of your project at the top of the Project Navigator and edit it. Back everything up first! If you are under version control, such as SVN, commit your working copy first! Xcode knows about SVN and GIT and once you change the project name, there will be no confirmation before Xcode extensively modifies your working directory. If you want to undo the change, you’ll have to revert the working copy and you’re likely to lose any other uncommitted changes.
On the other hand, if you don’t want to rename anything except the executable, here’s the full procedure in Xcode 4.1. The only file modified is the .xcodeproj file, as you would expect:
- Select Clean from the Product menu.
- Select Project Navigator under View->Navigators (or click the icon at top left).
- Click the triangle to see the files in your project, if necessary.
- At the bottom of the list, click the triangle to disclose the Products folder.
- You'll see the name of your executable; do not try to change it. Instead, click the Products folder to select it.
- Hit the delete key to delete the Products folder and your old executable name.
- Select your project at the top of the Navigator view.
- Immediately to the right of the Navigator, under Targets, click and change the name of the executable.
- Click the Summary tab and check that the preference file Identifier is the one you want.
- Work your way through every item under the Product->Build For menu, building all targets.
- Select Product->Manage Schemes..., select your scheme, and press the Edit... button.
- Select Run at the left of the dialog and pull down the Executable menu, select Other... and choose your new executable.
- Do the same for Profile at the left of the dialog. Close the dialog.
- Quit Xcode and then restart it by opening your project.
- You'll see your new name at the bottom of the Navigator. Select it, right click, and choose "New Group from Selection".
- Click on the new group and rename it "Products".
-- Glenn Fawcett