I work with multiple projects in the same workspace. Each project uses the same library code, adding a few tweaks + resources (large pdf files) and metadata.
To create a new project, my practice has been to duplicate an existing project and then pull it into the workspace, This process isn't completely trivial, so I thought I post it.
Here's the recipe:
- Copy the project folder in finder and rename
- Add to workspace using these directions (right click, add file, pick .xcodeproj file)
Rename the project as shown below
- If your appDelegate has the project name in it (per convention), it is necessary to not only use the refactoring tool to rename it, but also search for appDelegate & rename it in all files that reference it via a string (main.m is the usage I have in my project)
int main(int argc, char *argv)
NSAutoreleasePool *pool = [NSAutoreleasePool new];
int retVal = UIApplicationMain(argc, argv, nil, @"detroit_gary_and_some_chicagoAppDelegate");
- Change the prefix header
- Finally to change the name of the scheme (which is how it appears in the xCode dropdown) you have to lather the scheme by doing the following (from http://stackoverflow.com/questions/5346767/is-there-a-way-to-rename-an-xcode-4-scheme):
Not the easiest process, but at least it lends itself to a straightforward recipe.
It follows that Best Practice is to minimize the number of "project specific" names that you use in the project, minimizing the number of changes. This recipe only covers the case in which you change the project name, project folder and appDelegate.