Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode4 target labelled as missing, but cannot delete it

Tags:

xcode4

targets

Xcode4.2 Edit Schemes dialogue

I want to delete this red-marked target, but am unable to.

The "minus" button in the dialogue remains greyed-out, it doesn't respond to backspace or delete keys and right-clicking just brings up help options. I can drag the missing-red-marked target above or below the working black target, but it doesn't let me delete it.

This missing red target only seems to appear in this edit schemes dialogue.

In my main project/target window, I just have the one good target there.

Any ideas how to clean this up and delete this missing target?

like image 925
SubG Avatar asked Dec 08 '11 21:12

SubG


3 Answers

What worked for me was to designate another executable (or none) in the existing scheme's various actions (run, test, etc.). It's the fact it's in use in the scheme's actions that prevents its deletion. I discovered this during my research for Mastering Xcode 4 (yes, shameless plug). :-)

like image 112
Joshua Nozzi Avatar answered Nov 08 '22 18:11

Joshua Nozzi


Try creating a brand new scheme (via "New Scheme" or "Manage Schemes...") and start using that.

Once your new scheme is building properly and is set as a default, you should be able to delete the old scheme with the bogus "missing" target.

like image 22
Michael Dautermann Avatar answered Nov 08 '22 18:11

Michael Dautermann


The real issue here is explained by Joar Wingfors in the Xcode-users mailing list (emphasis mine):

In the scheme sheet you cannot delete things from one tab that some other tab depend on. In this case you probably have to delete the target from the test tab before you can delete it from the build tab. Or something along those lines.

like image 8
Ohad Schneider Avatar answered Nov 08 '22 19:11

Ohad Schneider