Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Copy targets from one Xcode project to another?

Tags:

copy

ios

target

Is it possible to Copy targets from one Xcode project to another, and if so, how?

Thanks!

like image 205
SimplyKiwi Avatar asked Aug 31 '11 01:08

SimplyKiwi


1 Answers

You will have to copy/paste or re-add the files to the new target/project in Xcode 8.

Copy Build Settings

The Build Settings panel supports copy/paste of rows, and it'll overwrite the existing values.

  1. In Xcode go to the target you want to copy settings from and open the Build Settings tab
  2. Switch to "Customized" to see only changes and choose "Combined"
  3. Select your top-level , which should be the same name as your Xcode project
  4. Select all and then copy (Command + C) the Build Settings tab
  5. Open the new project/target to the Build Settings tab
  6. Paste the copied settings (Command + V)
  7. Repeat for the specific target properties (static library, executables, etc.)

Copy Build Phases

You won't be able to copy/paste these settings (unless you dig around in the project file in a text editor, but I don't recommend).

  1. Open both projects side by side, and then add each target dependency, source file, linked library, and headers to the new project/target
  2. Re-create new build scripts and copy your scripts (if you have them)
  3. Re-create new copy file phases any build scripts and copy file phases (if you have them)
like image 192
Paul Solt Avatar answered Sep 18 '22 17:09

Paul Solt