ios-chat icon indicating copy to clipboard operation
ios-chat copied to clipboard

可以支持一下swift的集成吗

Open ZClee128 opened this issue 1 year ago • 4 comments

既然使用了xcframework,应该可以让swift直接使用头文件,不需要再桥接

ZClee128 avatar Sep 02 '24 02:09 ZClee128

请参考 https://github.com/wildfirechat/WFSwiftDemo 这个项目

heavyrain2012 avatar Sep 25 '24 03:09 heavyrain2012

这个是oc项目

ZClee128 avatar Sep 25 '24 08:09 ZClee128

因为SDK是OC的,所以swift可以用桥接的方法来使用SDK,跟直接使用也没有什么区别

heavyrain2012 avatar Nov 27 '24 02:11 heavyrain2012

在打包出的 sdk 中新建个文件夹Modules, 里面放个module.modulemap, ios-arm64 和ios-arm64_x86_64-simulator, 都要放

Image

这样在Swift 中可以直接引用import WFChatClient

framework module WFChatClient {
  umbrella header "WFCChatClient.h"

  export *
  module * { export * }
}

zeroskylian avatar Sep 24 '25 01:09 zeroskylian