Renaming a Project in XCode
Assume you are starting with a project named
"MyWOProject" and that you want to change its name to
"MyNewWOProject". 1. Duplicate the
"MyWOProject" directory and name it
"MyNewWOProject". 2. Rename the
MyWOProject.xcode file inside the MyNewWOProject directory to
MyNewWOProject.xcode. 3. Open the
MyNewWOProject project in Project
Builder. 4. Rename the MyWOProject
target MyNewWOProject a) Make the target
MyWOProject active. b) Select Edit Active
Target 'MyWOProject' from the Project
menu. c) Under Target Summary pane, enter
'MyNewWOProject' in Base product name. d)
Under Info.plist Entries/Expert View, change the project name for NSExecutable
and NSJavaPathClient properties. e) In
the Groups & Files project pane, expand
targets f) Select MyWOProject target and
select Rename from the File menu 5.
Choose Clean All Targets from the Build
menu. At this point, if you build the
project, the file still has the name MyWOProject, as does the .woa directory and
the URL for connecting to the application. A few more steps are necessary to
complete the process. 6. Quit
XCode. 7. Open a terminal window,
and navigate (using 'cd') INTO the project (which is a unix package directory).
For example... % cd
/Users/kieran/MyNewWOProject/MyNewWOProject.xcode
List the contents with
% ls
-al Open the file
project.pbxproj with a text editor (such as vi for
example , as I do here)... % vi
project.pbxproj8. In vi,
replace all occurrences of MyWOProject with MyNewWOProject by pressing the colon
key ( : ) (the colon key initiates the vi command line) and then type
%s/MyWOProject/MyNewWOProject/g. So you literally type these characters
(replacing with your old and new project names of
course):%s/MyWOProject/MyNewWOProject/gSave
and exit vi by typing literally a colon, the letters 'w' and
'q'...:wq
9. Open MyNewWOProject in XCode.
10. Build and run the application.
Posted: Sunday - December 26, 2004 at 04:59 PM