AudioKit 5 and Xcode 12 beta 6 Build Errors

Viewed 1059

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.

2 Answers

AudioKit 5 definitely does support Xcode 12 - however maybe you are using the wrong branch. You should really be checking out the v5-develop branch instead of master for the latest changes.

In addition, this branch currently works with the Swift Package Manager which should alleviate the need to compile the frameworks by yourself.

This branch is very much in flux though with lots of changes to the API so you will probably have to adapt your code.

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.

Related