Can't build my Swift application using my own framework after xcode's 12.5 update

735 views Asked by At

Since the xcode's 12.5 update, I can't build my application using my own framework.

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)'

My framework is using https://github.com/ashleymills/Reachability.swift , and I have another error on a generated file : x86_64-apple-ios-simulator.swiftinterface On this line :

extension MySwiftFramework.Reachability.NetworkStatus : Swift.Hashable {}

I have this error

Conformance of 'Reachability.NetworkStatus' to 'Equatable' is unavailable

After some modification, I finally build my library (xcframework) with Swift 5.4, but when I try to import or embed into my application, I have the same error about the conformance to equatable, but also this new one :

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
1

There are 1 answers

2
vsr On

I edited the Reachability.swift by adding Equatable conformance to the NetworkStatus. Post which, framework was rebuilt again with the xcode version 12.5.1. I was successfully able to import the framework in the app and there were no errors.