请问用swift编译出的framework如何实现向下兼容?

月巴成狗
  • 3
新手上路,请多包涵

我尝试了开启 BUILD_LIBRARIES_FOR_DISTRIBUTION=YES,然后重新编译,得到的framework拿到低版本的xcode上去运行依旧编译不通过,并且报错failed to build module from its module interface; it may have been damaged or it may have triggered a bug in the swift compiler when it was produced,求解!

评论
阅读 111
1 个回答
月巴成狗
  • 3
新手上路,请多包涵
✓ 已被采纳

已解决,报错的原因是由于swift代码里重写了init方法,并且@objc了,把@objc改成@nonobjc就就行了

撰写回答

登录后参与交流、获取后续更新提醒

宣传栏