Thursday, March 4, 2010

Rename project File and Target Name in XCode

Hi Friends,

This post is going to help you to change the name of your Project in XCode. And follow the steps given below to achieve the same.

1. Make a copy of your project Folder and delete the build folder if there is one.
2. Rename it to the name you wish to have.
3. Change the name of the .xcodeproj file to the name you wish to have.
4. Change the name of the .pch file.

Now it seems to be fine and when you run you will be blocked by the following error:
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1

So lets get to the fifth step.
5. Go to the Targets. Right click on your Target Name and click Get Info.
6. Now go to the Build tab and find the GCC_PREFIX_HEADER in the User-Defined section and you will find the name of the .pch file that you have just renamed and voila.

For renaming the Target, just change the "Bundle display name" in your <project-Name>-info.plist file. And your done...

No comments:

Post a Comment