Renaming a project in XCode 3.x

As I told previously, I am learning iPhone apps programming in my free time these days. One of the problem I faced recently was related to renaming the project in XCode.

Renaming a project in XCode is not so easy. There is no automatic procedure to do the renaming so I trying to do it manually … and it worked!

Suppose you want to rename the project named “TechX” to “TechX_New”.

1. Copy the “TechX” directory and name it “TechX_New”.

2. Rename the TechX.xcodeproj TechX.pch files inside the TechX_New directory to TechX_New.xcodeproj and TechX_New.pch.

3. Delete the build folder if you have any.

4. Open TechX_New.xcodeproj file in text editor, like TextMate or TextWrangler. [It is a folder containing 4 files – you can also right-click and do Show package contents, which will reveal the files]

5. Open project.pbxproj in text editor and replace all instances of the “TechX” with “TechX_New”.

6. Load the project file in XCode, do Build/Clean all targets

Advertisement

Leave a Reply

Your email address will not be published. Required fields are marked *