将“.framework”文件包含到 cocoapods

Tun*_*vel 6 xcode frameworks ios cocoapods

我正在尝试将“Custom.framework”添加到我的 pod(cocoapods)。而且我对 pod 规格设置有些困惑。我做了以下工作:


s.resources = ['Resources/Custom.framework']
s.preserve_paths = "Resources/Custom.framework"
s.frameworks  = "UIKit", "Custom"
Run Code Online (Sandbox Code Playgroud)

但是在我使用这个吊舱的项目中,我收到了错误

<Custom/Custom.h> not found
Run Code Online (Sandbox Code Playgroud)

或类似的东西。

我已经被困了几个小时,我无法在谷歌中找到我的问题的答案。

BR,帕夫洛。

Kei*_*ley 7

你想要的是vendored_frameworks属性。在您的情况下,您似乎想像这样使用它:

s.vendored_frameworks = 'Resources/Custom.framework'
Run Code Online (Sandbox Code Playgroud)

这会自动处理保留路径和链接框架本身的问题,因此您的自定义框架不需要这些属性中的任何一个。