Search code examples
iosswiftaudiokit

AudioKit 5 and Xcode 12 beta 6 Build Errors


I'm trying to build a project using AudioKit 5 (master branch) XCFrameworks in XCode 12 beta 6 for iOS 14 and I'm getting 1 warning and 2 errors:

Warning:

Could not find or use auto-linked library 'swiftAVFoundation'

Error 1:

Undefined symbol: _swiftoverride_class_getSuperclass(swift::TargetMetadataswift::InProcess const*)

Error 2:

Undefined symbol: swift::swift51override_conformsToSwiftProtocol(swift::TargetMetadataswift::InProcess const*, swift::TargetProtocolDescriptorswift::InProcess const*, llvm::StringRef, swift::TargetProtocolConformanceDescriptorswift::InProcess const* ()(swift::TargetMetadataswift::InProcess const, swift::TargetProtocolDescriptorswift::InProcess const*, llvm::StringRef))

Any ideas why this might be happening? Note: The exact same project works fine in XCode 11 when building for iOS 13.7.


Solution

  • From what info the error is giving, it sounds like it Xcode is having trouble finding the Swift 5.1 methods which makes sense. Xcode beta will be using the latest version of Swift which I believe is 5.3

    You should try what @megastep says. I just built the v5-develop branch and ran the AKMIDITrackView example on my iPhone with the latest iOS 14.0 beta 8 and Xcode 12 beta 6.

    You can check out the example here if you want to try building a demo AudioKit project which is helpful to do sometimes: https://github.com/AudioKit/MIDITrackView

    And that's right! I just discovered the Swift packages which is a very nice feature. I believe if you just select the Code button on an example project and select Open with Xcode everything will be taken care of for you.

    In my tutorial, I wasn't using Xcode beta which is why I chose to use the v5-master branch. I should have made that more clear. I'll make sure to do that next time.