IOS Target Duplication

Basically Xcode IDE allows duplicating target and use the same source base for multiple applications.

Here are the steps to do that, considering the "Toolset" as main target and "Toolset Lite" as duplicate target.

Step - 1
  • Go to project settings
  • right click on the desired target to be duplicated
  • choose "Duplicate" (or) alternatively use cmd+D.


Step - 2
  • In the next dialog box shown choose "Duplicate Only".


Step - 3
  • Right click on duplicate target
  • Choose "Rename"
  • Rename the duplicated target with proper name ("Toolset copy" to "Toolset Lite" here)


Step - 4
  • Close all the opened trees in project navigator except project tree
  • Once closed Right click on the new plist file
  • Choose "Rename"
  • Rename the plist with a proper name and make sure you copied tha name


Step - 5
  • Go to new target's build settings.
  • Search for word "copy"
  • In setting named "Info.plist File" set the same name by pasting the name of plist.
  • In setting named "Produce Name" give the name same as target name ("Toolset copy" to "Toolset Lite" here)


Step - 6
  • Go to new target's summary and pick app icon as well as splash for the new target/app


Step - 7
  • Go to "Manage Schemes" under "Product Menu"
  • Delete the schema created by xcode when target is duplicated ("Toolset copy" here) by choosing "-" at bottom


Step - 8
  • Choose "+" and add the scheme created by yourself ("Toolset Lite" here)


That's it you are done with creation of duplicate target. Now if you would have ti distingush between targets in code level you have follow few more steps mentioned here

Thanks for reading - your comments encourage me, Rama Krishna Chunduri
Share