Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Duplicating an Xcode 4 Project

Tags:

xcode

ios

iphone

Basically I want to make an independent copy of my Xcode project and all of my files. How can I do this? I'm researching graphing frameworks and I want to use the same UI for each.

like image 952
Randall Avatar asked Jun 21 '11 15:06

Randall


2 Answers

Seconding @zoul's comment, this can be accomplished in Xcode 4.5 with four steps.

  1. In Finder, duplicate the project folder. Do not update the .xcodeproj file name.
  2. In Xcode, rename the project. Accept the proposed changes.
  3. Still in Xcode, rename the scheme in "Manage Schemes".
  4. In Info.plist, rename your Bundle identifier.
like image 111
Chris Schiffhauer Avatar answered Nov 02 '22 23:11

Chris Schiffhauer


Few months ago, I had the need to create a different applications with the same source code. I didn't wanted to copy the full directory, so I came up with a procedure that allowed me to mantain the source code in one place and create many different apps based on the same source code.

My procedure is the following:

  • duplicate the target to make a new target and change the name to the new name
  • change the name of the product and info.plist in the build options (select the new target and click info button), make sure this is for All Configurations
  • rename the info.plist file created at the duplication to "newnameInfo".plist (click on the file and then info button and pick the target)
  • add icon.png to the resources for the specific target.
  • change the name of the icon
  • in the NewnameInfo.plist change the icon name to icon_xxx and the bundle identifier com.yourdomain.newname
  • in language/other flags you can have a flag to check at the code.
  • create a new APP_ID in the iOS Provisional Portal
  • if APN is used, configure the APN BEFORE creating the development profile
  • create a new development & distribution (ad-hoc or appstore)
  • in Target (info) choose the right profile for the code sign

I hope this helps.

--nnahum

like image 22
nnahum Avatar answered Nov 02 '22 23:11

nnahum