问题描述
我正在尝试将 Custom.framework添加到我的广告连播(cocoapods)。
而且我对Pod规范设置有些困惑。我已经完成以下操作:
I'm trying to add "Custom.framework" to my pod (cocoapods).And I'm a bit stuck with pod spec setup. I've done following:
s.resources = ['Resources/Custom.framework']
s.preserve_paths = "Resources/Custom.framework"
s.frameworks = "UIKit", "Custom"
但是在我正在使用此Pod的项目中,我遇到了错误
But in project where I'm using this pod, I'm getting error
<Custom/Custom.h> not found
或类似的东西。
我已经被困了几个小时,在Google中找不到我的问题的答案。
I'm stuck already for a few hours and I can't find answer to my question in google.
BR,帕夫洛。
推荐答案
您想要的是属性。在您的情况下,您似乎想像这样使用它:
What you want is the vendored_frameworks
attribute. In your case it looks like you'd want to use it like this:
s.vendored_frameworks = 'Resources/Custom.framework'
这会自动处理路径并链接框架本身,因此您不需要这些属性用于您的自定义框架。
This automatically deals with preserving the path and linking the framework itself so you don't need either of those attributes for your custom framework.
这篇关于包括“ .framework”提交给cocoapods的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!