Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCode: add build phase is disabled

Tags:

ios

xcode6

I want to add Crashlytics plugin to my iOS project that demands to add Run script phase. But no matter what I do - for add build phase all options are disabled:

enter image description here

  • I select Target -> Build Phases
  • I have proper scheme
  • My project runs well - no issues,

I run Xcode 6

like image 616
Maxim Shoustin Avatar asked Sep 18 '14 22:09

Maxim Shoustin


People also ask

How do I run a build phase script in Xcode?

Go to the Build Phases section of your project. (Click on the project, then on the main target, then on the “Build Phases” tab along the top.) Click the + at the top left to create a new build phase; choose “New Run Script Phase.” Xcode creates the script at the end of the list, naming it “Run Script.”

What is a build phase?

The build phase is the time in your training for exactly that—building a strong foundation which will equate to speed and overall efficiency as an endurance athlete.

What is aggregate Xcode?

An aggregate target has no associated product and no build rules. Instead, an aggregate target depends on each of the targets you want to build together. For example, you may have a group of products that you want to build together. You would create an aggregate target and make it depend on each of the product targets.


2 Answers

I answer on my question because took me time to find right solution.

Its really strange that the same issue migrates from old versions to XCode 7+. I found solution in one of the comments of similar problem:

how-to-add-a-copy-files-build-phase-to-my-target (credits to @Paul Solt)

Its a bug, when user selects Build Pahses tab, XCode doesn't see that.

Solution

  • select Target -> Build Phases
  • After, click on any area under search form or better way, just open Target Dependencies drop down
  • Editor -> Add Build Phase

I hope it will save time to someone instead to read comments ;)

like image 82
Maxim Shoustin Avatar answered Nov 11 '22 09:11

Maxim Shoustin


The upvoted solution did not work for me but there is another - even though the "Editor->Add Build Phase" is grayed out the small "+" in the top left of the "Build Phases" pane is not, and it works.

So select the project in the project navigator Select the target Select "Build Phases" in the top bar of the content pane Click the "+" symbol in the top left of the "Build Phases" pane

like image 42
James Whong Avatar answered Nov 11 '22 08:11

James Whong