Use 3rd party pod in sub-project (framework project)

我是研究僧i 提交于 2019-12-04 22:54:52

You can do this three different ways.

1) Add the dependency directly to you MyApp project

2) Build the MySubProject and add the library with the dependency in it to the MyApp project. (assuming the MySubProject will be a library)

3) When using custom pods you can provide a dependency in the .podspec file. Via this method I can import my own library (as a pods) which depends on other Cocoapods.

EDIT: After a good look we came to the conclusion that the methods above didn't met leem.fin's specific requirements. It's NOT possible to include a framework into another framework. But there're two other options:

1) Ship the secondary framework besides your framework and link it to your own framework. This way both MySubProject and MyApp can link to that framework.

2) Import the sources directly into MySubProject so they'll be compiled with the MySubProject.framework and they're accessible for other targets that simply link to MySubProject.

The easiest way is importing the sources directly into the MySubProject. If you don't copy the resources but link to the folder, you can git update the sources when you need to to get the latest changes.

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