iPhone Development 101

iPhone 101

Code Tips

Resources

Links

Subscribe

TwitterRSSE-mail

More

iPhone Development 101: Xcode:
Renaming a Project in Xcode

Xcode now makes it pretty easy to rename an entire project, although (as of 3.2.5) it doesn't rename the app delegate. Here's how to do that.

To duplicate an existing project, you should first make a copy of the project folder on your Mac. Rename the copy to whatever new name you want to call this project, then open the new folder and double-click on the .xcodeproj file to launch Xcode.

In Xcode, go under the Project menu and select Rename, and rename the project to whatever new name you want to use. This will change the app name and update all of the linking, although it won't rename your delegate file:

If you want to rename the app delegate also, open the app delegate's .h file and select the delegate name in the @interface line:

With the text selected, go into Xcode's Edit menu and select Refactor. Type the name of the new app delegate file into the text box, and click "Preview". You'll see a list of all the files that will be updated:

Click "Apply" to apply the changes.

At this point you've completely renamed your project. Build and Run the project to make sure it still works.


TopHome