由于 xcode 的 12.5 更新,我无法使用自己的框架构建我的应用程序。
Failed to build module 'mySwiftxcFramework' from its module interface; the compiler that produced it, 'Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)', may have used features that aren't supported by this compiler, 'Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)'
我的框架正在使用https://github.com/ashleymills/Reachability.swift,我在生成的文件上有另一个错误:x86_64-apple-ios-simulator.swiftinterface 在这一行:
extension MySwiftFramework.Reachability.NetworkStatus : Swift.Hashable {}
我有这个错误
Conformance of 'Reachability.NetworkStatus' to 'Equatable' is unavailable
经过一些修改,我终于用 Swift 5.4 构建了我的库(xcframework),但是当我尝试导入或嵌入到我的应用程序中时,我遇到了同样的错误,即与 equatable 的一致性,还有这个新错误:
Failed to build module 'mySwiftxcFramework' from its module interface; it may have been damaged or it may have triggered a bug in the Swift compiler when it was produced