Include “.framework” file to cocoapods

老子叫甜甜 提交于 2019-12-23 18:04:26

问题


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"

But in project where I'm using this pod, I'm getting error

<Custom/Custom.h> not found

or something similar.

I'm stuck already for a few hours and I can't find answer to my question in google.

BR, Pavlo.


回答1:


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.



来源:https://stackoverflow.com/questions/26950423/include-framework-file-to-cocoapods

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!