How to use pod package to create a compiled framework

情到浓时终转凉″ 提交于 2019-12-11 03:27:42

问题


I am trying to use the cocoa pods package extension to create a compiled framework.

The example project with source code and pod spec can be found here:

https://github.com/avnerbarr/TestFramework.git

The resulting output can be found here:

https://github.com/avnerbarr/TestFrameworkCompiled

The main idea is that I want to create a project using cocoa pods.

When I will need to distribute the close source - I need all of the dependencies to be contained in the resulting framework.

I don't want my end users to be forced to use cocoa pods.

But it would be great if I could leverage the cocoa pods abilities to compile and package everything together.

How should I do this?


回答1:


You can use the vendored_frameworks attribute for this. It allows you to specify a path to a compiled framework that will be linked with the users application.

spec.ios.vendored_frameworks = 'Frameworks/MyFramework.framework'


来源:https://stackoverflow.com/questions/30914987/how-to-use-pod-package-to-create-a-compiled-framework

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