Logic Pro cannot load v3 audio unit with framework compiled with Swift 6

Sequoia 15.4.1 (24E263) XCode: 16.3 (16E140) Logic Pro: 11.2.1

I’ve been developing a complex audio unit for Mac OS that works perfectly well in its own bespoke host app and is now well into its beta testing stage.

It did take some effort to get it to work well in Logic Pro however and all was fine and working well until:

The AU part is an empty app extension with a framework containing its code. The framework contains Swift code for the UI and C code for the DSP parts.

When the framework is compiled using the Swift 5 compiler the AU will run in Logic with no problems. (I should also mention that AU passes the most strict auval tests).

But… when the framework is compiled with Swift 6 Logic Pro cannot load it. Logic displays a message saying the audio unit could not be loaded and to contact the developer.

My own host app loads the AU perfectly well with the Swift 6 version, so I know there’s nothing wrong with the audio unit.

I cannot find any differences in any of the built output files except, of course, the actual binary code in the framework.

I’ve worked for hours on this and cannot find a solution other than to build the framework in Swift 5. (I worked hard to get all the async code updated and working with Swift 6! so I feel a little cheated!)

What is happening? Is this a bug in Logic?
Is this a bug in Swift 6 compiler/linker?

I’m at the Duh! hands in the air, tearing out hair stage! ( once again!)

Answered by FrustratedCoder in 848799022

Maybe it serves me right that I can't delete the post above! It might make me think thrice before posting here ...

Ignore all above:

I found a crash log with a clue in it and it turns out this is in fact a bizarre async issue happening during my AU initialisation that wasn't caught before probably because it's in a bit of Objc code.

Accepted Answer

Maybe it serves me right that I can't delete the post above! It might make me think thrice before posting here ...

Ignore all above:

I found a crash log with a clue in it and it turns out this is in fact a bizarre async issue happening during my AU initialisation that wasn't caught before probably because it's in a bit of Objc code.

Logic Pro cannot load v3 audio unit with framework compiled with Swift 6
 
 
Q