Tuesday, February 14, 2012

Renaming Project in XCode 4


Renaming Project in XCode 4 :  
Some are having trouble figuring out how to rename projects in Xcode 4. As it happens, Apple’s made things quite easy. It renames the project and the product names of any targets sharing the project’s nameand any strings it finds in your nib/xib files. In theory, that is.
Here’s how:
  1. Open the project in Xcode 4.
  2. Click the project itself in the Project Navigator.
  3. Open the Utility pane (the right-most button in the View button panel in the right side of the toolbar).
  4. Select the File Inspector utility pane if it’s not already.
  5. Under the Identity group, set the Project Name field to whatever you like and press return.
  6. You’ll be asked which items to rename (including any targets or strings in nib/xib files sharing the same name as the project).
  7. Cherry pick which ones you want to rename (probably all of them) by unchecking those you don’t, then click Rename.
  8. You may be asked to take a snapshot of the project. My advice? Do it. Xcode 4 still has bugs and crashed on me the first time I tried this, resulting in a screwed up project. Click Enable to enable snapshots if asked.
  9. Assuming there are no errors, all checked items will have a green checkmark next to them and the rename sheet’s button will turn to Ok. Click it and you’re done.