Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Target Membership grayed out ( disabled )

I'm trying to create a new unit test build target for my iphone app. The problem I'm running into is that my source code "group"'s Target Membership options are grayed out.

I did delete the original "Classes" folder, and created new "SourceCode" folder with an actual disk structure (thanks xcode). I imported it as a group, not a folder. It added automatically to my standard build target's Compile Sources, but I can't add it or drag it into my new target.

Any thoughts?

alt text http://img.skitch.com/20100118-mhurmqc33ecaq4xq3y2e5k3hs4.jpg

like image 538
DougW Avatar asked Jan 19 '10 00:01

DougW


People also ask

How do I change my target membership Xcode?

You can access Target Membership by selecting file and opening the right menu in Xcode (the menu is called Inspectors ). Then, in File Inspector at the bottom of the menu, find Target Membership . It's very important to check all files in your project because without this you won't be able to build a new app target.

What is an Xcode target?

A target specifies a product to build and contains the instructions for building the product from a set of files in a project or workspace.

How do I add files to target in Xcode?

I include them in the project by right-clicking on the project folder in the project view in Xcode, and selecting "Add Files to ...". I then navigate to the folder containing the source files, click on the folder and select "Add." With the options "Create folder references" and "Add to target [target name]".


1 Answers

This happened to me with Xcode 10.2 and a rather old project. The cause for me was that in the target settings the item "Headers" was missing for the target in Build Phases. Click the +, and select "New Headers Phase". Now you can properly add the headers to the target.

like image 197
RickJansen Avatar answered Oct 06 '22 00:10

RickJansen