Fix AVFoundation in Xcode 12 beta 3
Jul 24, 2020 15:11 · 69 words · 1 minute read
If you’re encountering the error AVAudioSesson is unavailable on macOS
on Xcode 12 beta 3, you can manually fix this as follows.
Look in /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/swift/AVFoundation.swiftmodule. Open the files:
arm64e-apple-macos.swiftinterface
x86_64-apple-macos.swiftinterface
Change both occurrences of:
@available(iOS 7.0, watchOS 2.0, tvOS 9.0, *)
extension AVAudioSession.Location {
to:
@available(OSX, unavailable)
@available(iOS 7.0, watchOS 2.0, tvOS 9.0, *)
extension AVAudioSession.Location {
I’m expecting there will be another beta soon which fixes this.cd ../..