Renaming an Xcode project or executable.
If you have used Xcode before you know that when you create a new project the name you give the project is used as the name for the target executable.Â But what do you do if you come up with a new name for your application or want to create a similar project with some minor changes.Â Well you have two choices.
1.Â Rename the entire project.
2.Â Rename only the executable.
Update: XCode 3.2.3 now provides a built in rename. Open the project you want to rename in Xcode then under Projects select rename.
Renaming a project in Xcode 3.x
This seems like it ought to be a simple process provided by Xcode but it is not.Â Here is how to do it.
1.Â Copy and rename the project folder
2.Â Inside the new project folder rename the files ending in .pch and .xcodeproj
3.Â Right click on .xcodeproj file (it is actually a folder) and select show contents. In the contents folder there should be a file ending in .pbxproj. Open This file in you favorite editor and replace all instances of the old project name with the new project name.
4.Â Delete the build folder
5.Â Open the Renamed Xcode project and right click (Control click) on the Target from the groups and files list. Select Info to open the properties panel.
6.Â Click on the build tab the select packaging from the collection pop up menu
7.Â Change the value in the product name build setting to the new name.
8.Â Do Build Clean all Targets.
Changing the executable name
1. Open the Xcode project and right click (Control click) on the Target from the groups and files list. Select Info to open the properties panel.
2.Â Click on the build tab the select packaging from the collection pop up menu
3.Â Change the value in the product name build setting to the new name.
4.Â Do Build Clean all Targets.