2

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
gamerounet
  • 279
  • 4
  • 22
  • Is your minimum deployment target above the supported version? Shou(IPHONEOS_DEPLOYMENT_TARGET) – ilker May 28 '21 at 10:28
  • actually it's the same, I specify 10.2 in Deployment Info value in my application test and 10.2 in iOSDeploymentTarget in my framework – gamerounet May 28 '21 at 14:46
  • I think I finally rebuild my xcframework with swift 5.4. But when I try to add it into my application , I got a little different error : 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 – gamerounet May 28 '21 at 18:15
  • I finally edited the reachability library, removing the Reachability.NetworkStatus function. After this, I could build my framework again with the new xcode version, and I had no more error when I import my framework in my app – gamerounet Jun 25 '21 at 15:48

1 Answers1

0

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.

vsr
  • 1