Xcode 4: Renaming projects

Xcode 4.x is a great leap forward for iOS and Mac OS Developers. Many thanks should be expressed to Apple and its engineers for their hard work in putting together such a toolset. If you were used to Xcode 3.x’s way of doing things, then you might find yourself wondering how to do various operations that seemed to have disappeared. Renaming a project one such feature that took a while to relocate, so I am sharing how it is done in Xcode 4.x. It is much better to rename the project through the mechanism provided by Xcode than trying to rename the project file via the Finder. I have done so in the past, and it wrecks havoc on the project settings.


Step 1. Select the project in the Navigator (left side of Workspace. Command-1 to reveal).




Step 2. Make sure the File Inspector is visible. (right side of Workspace. Command-Option-1 to reveal, or third most button in the view button cluster).


Step 3. Under Identity, you will see the Project Name text field.

Change the name of the project to the new desired name.

A drop down sheet will appear when you exit the text field. It will be showing you what will change, giving you one last chance to back out…sort of. This last chance inquiry is for settings that are derived from the project’s name (target name, product name, prefix header, etc.).

If you say “Don’t Rename”, the project itself will still be renamed, but the auxiliary portions won’t. This could potentially leave things in an unsavory state. I imagine this is a bug, and as a matter of fact, even had Xcode crash more than once when testing out renaming of the project, but not going through with it.

You may also be asked whether you want to take a Snapshot prior to preforming the renaming. This is entirely up to you and your risk tolerance.

That about covers it. Happy programming!



Tags: , , , ,

Comments are closed.