How to use Cocoapods in a Swift framework?

旧时模样 提交于 2019-11-30 07:19:29

I found the solution, so I will let it here in case someone else has the same issue.

So, Cocoapods supports iOS frameworks since version 0.36, and as it's said in their blog, to use it in a framework, you just have to add this line in your Podfile:

use_frameworks!

After that, in a Swift framework, you don't need to include the .h files in your umbrella header, but you do need to import the module wherever you need it, for instance:

import MBProgressHUD

This is working for me, hope it helps!

Ashok

Using 'Objective-C bridging header' we can make use of Objective-C frameworks in Swift.

Refer the following, It will explain how to make use of Objective-C framework(For example Parse framework) in Swift.

Link1
Link2

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