小编Seb*_*lin的帖子

Swift 版本冲突:编译器不支持此 SDK - 使用 BUILD_LIBRARY_FOR_DISTRIBUTION 设置。可能是什么问题?

我正在构建一个 Swift 静态库:

  • Xcode 13.2(Swift 编译器 5.5.2)
  • iOS 部署目标 12.0
  • 构建用于分发的库
  • 跳过安装
  • Swift 语言版本 5 并尝试使用 CocoaPods 管理的 4.2 依赖项:
  • 日本3.0.0
  • 阿拉莫菲尔 5.2.2
  • 接收Swift

当我尝试使用此设置将其添加到 iOS 项目时:

  • Xcode 13.3(Swift 编译器 5.6)
  • iOS 部署目标 12.0
  • Swift 语言版本 5 并尝试使用 4.2 并构建我收到此错误:
Failed to build module 'LibraryX'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.5.2 effective-4.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)', while this compiler is 'Apple Swift version 5.6 effective-4.2 (swiftlang-5.6.0.323.62 clang-1316.0.20.8)'). Please select …
Run Code Online (Sandbox Code Playgroud)

xcode swift swift-framework swift-compiler

9
推荐指数
0
解决办法
4229
查看次数

标签 统计

swift ×1

swift-compiler ×1

swift-framework ×1

xcode ×1