CocoaPods with XCode 6.0.1 - How can I fix Pods Frameworks appearing in red?

后端 未结 5 2050
执笔经年
执笔经年 2020-12-30 00:49

I have created a new project in Xcode 6.0.1 and created the following Podfile:

source \'https://github.com/CocoaPods/Specs\'
platform :ios, \'8.0\'

pod \'AF         


        
相关标签:
5条回答
  • 2020-12-30 01:02

    I had the same strange problem, where the libraries where correctly recognized on one machine, but not on another - there they were also in red.

    The solution was to add the Pods target to the building scheme ("Product > Scheme > Edit Scheme..." then add with + the Pods main target and put it in front of your main target.) Then clean and build the project.

    0 讨论(0)
  • 2020-12-30 01:10

    I had the same problem. It turns out I just need to run a pod update with

    sudo gem install cocoapods
    
    0 讨论(0)
  • 2020-12-30 01:16

    I had the same problem.And resolved by changing the path of the 'red framework'.because the path shows 'SDK IOS9' before.So i set the framework location 'relative to SDK' and choose the right framework location manually.and it works temporarily.

    I guess the reason is that i updated to Xcode 8,but my coacopods is still old version,so it set the location with IOS9 which cause this problem.

    0 讨论(0)
  • 2020-12-30 01:17

    Just delete all configs in the the Pods Group in xcode and run pod install again. This will regenerate the xcconfigs files. Then make sure they are set properly in the Project > Info > Configurations

    0 讨论(0)
  • 2020-12-30 01:18

    This is normal, since these frameworks don't exist in the pod's project path. As I see in tmpios->Frameworks doesn't appear in any of the frameworks that are supposed to exist. Choose your project,then Target->tmpios->Build Phases->Link Binary With Libraries and there add the frameworks you need.

    If still you have a compile error and doesn't find libraries of pods then write your pod file in that way:

    source 'https://github.com/CocoaPods/Specs'
    link_with  ['tmpios', 'tmpiosTests']
    platform :ios, '8.0'
    
    pod 'AFNetworking', '~> 2.0'
    

    Install pods, and at your project Target->tmpios->Build Setting->Other Linker Flags, add $(inherited).

    0 讨论(0)
提交回复
热议问题