Error building for Mac on Xcode 12 beta

I'm getting the following error when building TCA for Mac on Xcode 12 (beta 3) running on Catalina:

AVAudioSession is unavailable on macOS
/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/lib/swift/AVFoundation.swiftmodule/x86_64-apple-macos.swiftinterface:1:1: Failed to build module 'AVFoundation' from its module interface; the compiler that produced it, 'Apple Swift version 5.3 (swiftlang-1200.2.22.2 clang-1200.0.25.1)', may have used features that aren't supported by this compiler, 'Apple Swift version 5.3 (swiftlang-1200.0.22.4 clang-1200.0.25.1)'

These errors don't seem to be related to any source file of TCA. There is also another, similar error which appears tagged at the line in Debug.swift which does #if canImport(Speech):

Failed to build module 'Speech' from its module interface; the compiler that produced it, 'Apple Swift version 5.3 (swiftlang-1200.2.22.2 clang-1200.0.25.1)', may have used features that aren't supported by this compiler, 'Apple Swift version 5.3 (swiftlang-1200.0.22.4 clang-1200.0.25.1)'

Building for macOS on Xcode 11.6 is fine. I'm guessing this is just an artefact of building for macOS 11 on Catalina?

This is a bug in Xcode beta 3 that a lot of people have been experiencing, even outside of TCA. We hope that beta 4 is released soon and fixes it. You can fix it by just commenting out the speech stuff: https://github.com/pointfreeco/swift-composable-architecture/compare/xcode-12-fixes

1 Like

Thanks for the info @mbrandonw :+1:
I guess that's why the Xcode 12 beta build is commented on on CI for now :smile:

Terms of Service

Privacy Policy

Cookie Policy