美文网首页
使用Swift开发Framework遇到的问题及解决方法

使用Swift开发Framework遇到的问题及解决方法

作者: T92 | 来源:发表于2022-07-18 15:42 被阅读0次
  1. Failed to build module 'xxx'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.5 effective-4.2 (swiftlang-1300.0.31.1 clang-1300.0.29.1)', while this compiler is 'Apple Swift version 5.5.2 effective-4.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)'). Please select a toolchain which matches the SDK.

在build setting中将BUILD_LIBRARY_FOR_DISTRIBUTION设置为Yes

  1. Include of non-modular header inside framework module
    该问题发生场景为:依赖第三方framework,且项目中只能看到framework,头文件必须在Finder中才能看到。

解决:如果能看到头文件,在build perhaps->Headers中将头文件放到public中。如果看不到,需要在build setting->OTHER_SWIFT_FLAGS中添加-Xcc -Wno-error=non-modular-include-in-framework-module

相关文章

网友评论

      本文标题:使用Swift开发Framework遇到的问题及解决方法

      本文链接:https://www.haomeiwen.com/subject/nqhdirtx.html