45

I am trying to use a framework that requires me to add a 'Copy Files build phase' to my target. Does anyone know what this means and how to do it?

Zoe
  • 23,712
  • 16
  • 99
  • 132
TheLearner
  • 18,967
  • 35
  • 92
  • 162

4 Answers4

93

In Xcode 5, you have to click on your target, then on Editor (menu bar) --> Add build phase --> Add Copy Files Build Phase:

XCode process to add some "Build Phase"

barrast
  • 1,751
  • 1
  • 16
  • 27
  • I never would have thought to look in the Editor menu. When I try this, though, the options are greyed out. I guess I'm missing the first item, "click on your target". Where is the target? – Victor Engel Oct 04 '13 at 16:57
  • 2
    Ah. I found it. I had to click on the tiny triangle next to my project name to display the column listing the targets. – Victor Engel Oct 04 '13 at 17:29
  • 43
    There's a bug with Xcode where if the Build Phases tab loses focus all the options will be grayed out. You need to do the following: Click Target Name > Build Phases > Click on whitespace below phases > Editor > Add Build Phase – Paul Solt Oct 08 '13 at 18:51
  • 2
    In my case, clicking "Validate Settings..." helped enable the "Add Copy Files Build Phase" option – grim Dec 04 '13 at 19:16
  • 1
    This is totally out of place. Even more so if you consider that the little "x" to remove a phase is next to each phase. – insys Dec 31 '13 at 19:58
  • jesus, apple.. would never look there! thanks a lot for the solution :) – Alex Kremer Jan 17 '14 at 21:52
  • In Xcode 7.3.1, the menu remains grayed out, regardless of where I click to change the focus. Anyone have any suggestions? – houtanb May 23 '16 at 14:28
24

Right-Click on your target in XCode, select add "new build phase" and then "new copy files build phase".

DenNukem
  • 7,486
  • 3
  • 37
  • 44
Blitz
  • 5,263
  • 3
  • 31
  • 51
17

A "DIY" answer: Go to Xcode --> Help --> type your query, e.g., "add copy". And Xcode helpfully points you in the right direction.

enter image description here

Vivek
  • 514
  • 4
  • 12
7

In Xcode 4, the option is in Editor->Add Build Phase.

The Copy Files build phase then appears in the Project Navigator and you can add things to it by clicking the plus.

Adam
  • 928
  • 9
  • 21