Xcode4 target labelled as missing, but cannot delete it
Asked Answered
N

6

29

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?

Navar answered 8/12, 2011 at 21:43 Comment(0)
A
43

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). :-)

Amicable answered 10/12, 2011 at 2:25 Comment(5)
solved it for me. i had the wrong executable assigned in Profile. changing that to the correct app automatically removed the bogus target. thanks!Contracture
Wow, thanks for the tip! Just shows you can never assume anything.Routh
For the win! Wish the OP would accept this answer, as it's the correct one.Rimini
This is the better answer. Much simpler and fixes the problem without creating new schemes.Darin
thanks, yeah you will be able to remove the missing target once the dependencies to that target have been removed. You can see the dependencies that are uncheckable because they are grayed out. In my case I had to select the non missing dependency in Run and Profile sections in the executable section.Pinguid
C
8

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.

Cilicia answered 8/12, 2011 at 21:52 Comment(1)
Aye, that works - interestingly, "Duplicate Scheme" also duplicates the missing target too, so it has to be a brand new scheme. Only disadvantage this way is losing any non-default original scheme settings.Navar
F
8

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.

Feinstein answered 1/12, 2014 at 10:15 Comment(1)
Deleting from test and then build worked perfectly for me. Thanks!Internode
C
0

I had the exact same problem. Solved by closing the xCode and externally editing the schema file to delete the bundlableResource section for the missing library. Not the safest of all methods but it works.

Carborundum answered 12/5, 2014 at 22:24 Comment(0)
C
0

First delete all schemes and then generate the schemes again. Work for me .

Collbaith answered 22/1, 2015 at 13:55 Comment(0)
T
-1

What Joshua said, a bit tailored. Go through all various actions and change the missing executable to an existing one.

In your case, go to 'Profile' and switch to the new app. Same if you encounter this in 'Test' tab.

Tittivate answered 11/12, 2012 at 10:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.