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
  • 27,060
  • 21
  • 118
  • 148
TheLearner
  • 19,387
  • 35
  • 95
  • 163

4 Answers4

94

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,791
  • 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
  • 8,014
  • 3
  • 40
  • 45
Blitz
  • 5,521
  • 3
  • 35
  • 53
18

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
  • 564
  • 4
  • 13
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
  • 959
  • 10
  • 23