Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Frameworks are 'red' in Xcode

I downloaded a project developed by Apple employees ( who taught course at Stanford on iPhone application development). Strangely , the frameworks are red.

http://img.skitch.com/20100730-kcjun96mp2pxnpg7w3x6njw57.jpg

I tried to locate coreGraphics.framework and UIKit.framework to add them again but i couldnt find them either.

Taimur

like image 470
Taimur Ajmal Avatar asked Jul 29 '10 16:07

Taimur Ajmal


People also ask

Why are my frameworks red in Xcode?

The red text indicates that the actual files are not at the path that the project has for them. Get info on the framework and look under the General tab. The first section shows the name and path of the framework bundle itself.

What does red mean in Xcode?

If files marked in red, they are "not found" by Xcode. You either moved or deleted them within File Finder, outside Xcode. Delete the red marked files within XCode, then add them again to XCode.

What is framework target in Xcode?

A framework target means that your project compiles your code into a library which can then be consumed by other programs. CocoaPods are examples of frameworks. Unless you are building your own frameworks, you should pick "App Target".

How do I add frameworks in Xcode?

To include a framework in your Xcode project, choose Project > Add to Project and select the framework directory. Alternatively, you can control-click your project group and choose Add Files > Existing Frameworks from the contextual menu.


1 Answers

The red text indicates that the actual files are not at the path that the project has for them.

Get info on the framework and look under the General tab. The first section shows the name and path of the framework bundle itself. The most common cause of a problem with system supplied frameworks is that the path type has been changed to something that breaks the path. The default setting is Relative to Current SDK. Change the path until you get one that leads to the actual framework.

If you have the developer tools installed in a custom location, you are more likely to run into this problem. If you copy a project from someone with non-standard settings, you can encounter it as well.

like image 172
TechZen Avatar answered Sep 27 '22 20:09

TechZen