0
votes

In Xcode, when I add a framework directly in Build Phases->Link Binary With Libraries, the framework appears at the root level of the project. If I drag the framework into the Frameworks group, the link to the framework appears red in Link Binary With Libraries. I have to re-drag the framework back into Link Binary with Libraries for it to appear black again. Why is it doing this? Usually moving files around in group should not result in removing it.

Is there a way to make the framework appear in the Frameworks group when adding it?

1
Which Xcode version are you using? I cannot reproduce the issue in Xcode 4.6.3. When I follow your steps (which is a very common workflow, I guess), the framework name becomes red after dragging it into the appropriate group. This is not an issue though, it compiles/runs fine, and after changing to another section (e.g., Build Settings) and back to the Build Phase, the font is black again. - hagi
Yes the framework name became red - let me rephrase. - Boon
I'd just ignore it then. The framework will be linked properly, and the next time you get to the same setting (after switching to another section in Xcode in between), it will be black. No need to re-drag it. - hagi
Can you post this as an answer? I will accept it. - Boon

1 Answers

2
votes

It's just a visual issue and won't actually affect the link phase. If you leave the Build Phases section and return (directly, or later), the framework's name will be black as you'd expect it to be. There's no need to re-drag or re-add a framework. In Xcode 4, there's no way to have Xcode put the framework in the correct group automatically.