如何将c动态库(.dylib)导入Swift?我想使用libxml2.dylib。我把它作为一个框架添加到我的项目中,但是我不能使用它。
import libxml说:No such module
发布于 2014-06-04 22:15:12
为了在Swift中使用C功能函数,它们必须通过Objective-C包装器和桥接头公开。另请参见the Apple interop documentation。
发布于 2014-09-08 21:09:29
你需要
#import <libxml/tree.h>
#import <libxml/parser.h>到您的-APP-Bridging Header.h中
https://stackoverflow.com/questions/24038466
复制相似问题