xcode Pods.framework 为红色,DerivedData 中不存在
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/35731416/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Pods.framework in red, doesn't exist in DerivedData
提问by Andre M
I am trying to using Cocoapods 0.39.0 for the dependencies of my project. I have followed the steps, but I end up with a red Pods.framework in my project. If I look at the path where XCode 7.2.1 says it should be, it doesn't exist:
我正在尝试使用 Cocoapods 0.39.0 作为我项目的依赖项。我已按照步骤操作,但最终在我的项目中出现了一个红色的 Pods.framework。如果我查看 XCode 7.2.1 所说的路径,它不存在:
/Users/ajmas/Library/Developer/Xcode/DerivedData/myproject-cskuurnzjrcpcxfoyaceaeepshgt/Build/Products/Debug/Pods.framework
/Users/ajmas/Library/Developer/Xcode/DerivedData/myproject-cskuurnzjrcpcxfoyaceaeepshgt/Build/Products/Debug/Pods.framework
I have looked around at other entries in Stackoverflow, but I am not find anything indicating how the framework should be generated.
我已经查看了 Stackoverflow 中的其他条目,但没有找到任何表明框架应该如何生成的内容。
The contents of my Podfile are:
我的 Podfile 的内容是:
source 'https://github.com/CocoaPods/Specs.git'
target 'myproject' do
platform :osx, '10.11'
use_frameworks!
pod 'Alamofire', '~> 3.0'
end
Any ideas?
有任何想法吗?
Edit, also tried with Cocoapods 1.0.0.beta and no change, even after updating the Podfile to confirm to 'target' being a requirement now.
编辑,也尝试了 Cocoapods 1.0.0.beta 并且没有变化,即使在更新 Podfile 以确认现在“目标”是一个要求之后。
回答by konsti
Build your project with "Generic iOS Device" selected.
选择“通用 iOS 设备”构建您的项目。
回答by Hugo Tunius
If this happens it's most likely because you are using <your_project>.xcproject
. When you run pod install
CocoaPods creates a <your_project.xcworkspace
file that you need to use to have dependencies installed via CocoaPods be available when compiling.
如果发生这种情况,很可能是因为您正在使用<your_project>.xcproject
. 当您运行pod install
CocoaPods 时,会创建一个<your_project.xcworkspace
文件,您需要使用该文件使通过 CocoaPods 安装的依赖项在编译时可用。