I thought this would be a simple thing to do, but apparently not.
There’s no option to copy the state of the project as it is and continue working on it under the new name. The reason I need this is that I’m going through AAron Hillegass’s Cocoa Programming for Mac OS X, 3rd ed. and some of the projects span several chapters, each introducing new concepts. Thus I wanted to have each in the state it was at the end of the chapter, than compare and analyze the differences, to better understand what’s new and improved.
Since no option, we go with manual work.
Copy/rename the folder into new name
Get inside the new folder and rename the
Delete the build folder
.xcodeprojfile in text editor, like TextMate or TextWrangler. That’s actually a folder, which contains 4 files (you can also right-click and do
Show package contents, which will reveal the files)
Open project.pbxproj in text editor and replace all instances of the old name with the new name
Load the project file in XCode, do
Clean all targets
Now it should be ready for new build, under new name.
Update (Nov 28, ‘10): now there is a simple path: copy into a different folder, open the project and then in Xcode pick Project/Rename menu item. If that fails, there’s always a manual way above.