1、Pods库用swift创建的,需要引用OC,用外部添加桥接文件TargetName-Bridging-Header.h,行不通的
2、创建一个继承NSObject的public_header的OC类,把要引用的OC头文件添加到.h文件中;
在.podspec文件中加入s.public_header_files = 'xxx/Classes/public_header.h'
3、Pods组件库Classes目录下创建一个文件夹 TestFolder,在文件夹中新建一个testfile.modulemap文件,并把文件内容设置成
module test [system] {
header "xxxxx.h"
export*
}
执行一下pod install,就能在swift文件里使用OC了
备注:TestFolder、testfile、test,自己定义