问题
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