Frameworks are 'red' in Xcode

43,404

Solution 1

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.

Solution 2

Are you building for a Simulator or for Device?

Try building for Device.

Solution 3

Found a way to fix this automagically:

  • Right click your main Xcode project file (the blue one at the top alt text),
  • Get info,
  • 'General' tab,
  • At the bottom, set 'Base SDK for All configurations' to your desired one.

Done!

Solution 4

Steps to fix this issue in M1 Macs:

  1. Install "sudo gem install cocoapods-deintegrate cocoapods-clean" to install deintegrate if not installed.
  2. Run "pod deintegrate" in terminal in your project folder to uninstall all pods.
  3. Run "pod cache clean —all"
  4. Run "pod install"
  5. Go to Project Explorer Select "Pods" in blue
  6. Select the each pods in the target section
  7. Search for "Excluded Architecture" in Build Settings Tab under "All" sub category.
  8. Add "Any iOS Simulator SDK" in both debug and release and set the value to "arm64" Repeat this for each Pod with the error "Framework not found". Clean Build the project.

Solution 5

I had faced this problem before. I got over it by copy the missing (in red) framework from my friend's Mac then copy it to the Framework folder.

This is the path of my framework folder:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/System/Library/Frameworks

You may need to change the path depend on your system or your sdk version.

Share:
43,404
Taimur Ajmal
Author by

Taimur Ajmal

One might refer to me as a "techie" with immense enthusiasm for technology and very high goals. Software Developer by profession currently focused on developing for all Apple  products iOS (iPhone/iPod Touch/iPad) and MacOS.

Updated on February 14, 2021

Comments

  • Taimur Ajmal
    Taimur Ajmal about 3 years

    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

  • TechZen
    TechZen almost 14 years
    +1 This answer didn't deserve a checkmark. It's not really incorrect just poorly phrased.
  • Loquatious
    Loquatious about 12 years
    I'm getting 67 errors if i do like this and all frameWorks are having lock symbols. Plz try to solve my issue....
  • Snowcrash
    Snowcrash over 11 years
    There is no Get Info when you right click the Project icon in Xcode 4.5.
  • Pratik Somaiya
    Pratik Somaiya almost 11 years
    Hello. I found a similar issue in xcode 4.6.1 dont know what to do. Please help me.
  • Edd
    Edd about 9 years
    @SnowCrash double click on the project instead
  • jakecraige
    jakecraige almost 8 years
    Worked for me. I was building for "iPhone 6s", once I switched to "Generic iOS Device" it fixed them.
  • stealthysnacks
    stealthysnacks over 7 years
    @Edd I can't find 'Base SDK for All configurations' in this menu either.
  • Andrew Lee
    Andrew Lee almost 3 years
    Adding arm64 to the "Excluded Architecture" "Any iOS Simulator SDK" to the Pods project helped me, thanks.