Search code examples
audiokitxcframework

compilation error when porting AudioKit iOS app to Catalyst macOS app


I have an iOS app that has been working fine with AudioKit's iOS build. I wanted to try porting to macOS w Catalyst by dropping in AudioKit.xcframework. Here is what I did

  1. compile AudioKit-4.9.5 from source to generate AudioKit.xcframework (I had previously been using a locally compiled AudioKit iOS framework from the same source release with no issues on the non-Catalyst version)
  2. in the "General" tab,
    • checked Mac as a deployment target
    • removed the old AudioKit iOS framework
    • added AudioKit.xcframework
  3. in "Build Settings" tab,
    • change "Framework Search Paths" from the parent directory of the AudioKit iOS framework to the parent directory of AudioKit.xcframework
  4. in the "Build Phases" tab,
    • AudioKit.xcframework appears in "Link Binary with Libraries"
    • AudioKit.xcframework appears in "Embed Frameworks"

I receive the following errors,

AudioKit.xcframework compilation errors

Currently using Xcode 11.4.1.


Solution

  • Answering my own question here since this issue seems to be an artifact of the AudioKit module containing a AudioKit class. Renaming AudioKit class to something else fixes the issue although I'd discourage folks from doing this and instead waiting for a future AudioKit release that does this.