All third-party Audio Units are missing.

In my iOS AU host application, I am using AVAudioUnitComponentManager.components method to retrieve the list of availible Audio Units. It works as expected most of the time. Howether sometimes it returns only Audio Units created by Apple, and none of the third-party Audio Units that are installed on the device. The interesting thing is that, if after I encounter this issue in my app I go to GarageBand and open the Audio Unit list there then when I return to my app, all the third-party AUs are present. So I am wondering maybe some other initialization should be done before calling AVAudioUnitComponentManager.components method which GarageBand is doing and I also should do in my app.


Any suggestions?

Replies

Tried to register a dummy Audio Unit thinking it somehow triger the AU List refresh:


let desc = AudioComponentDescription(componentType: kAudioUnitType_MusicDevice, componentSubType: fourCC("dumy"), componentManufacturer: fourCC("dmkl"), componentFlags: 0, componentFlagsMask: 0)

AUAudioUnit.registerSubclass(DummyAudioUnit.self, as: desc, name: "Dmitry Klochkov: Dummy", version: 0)


But unfortunatly it didn't work. Now I see the Dummy audio unit in the list, but no other third party units.


And again, if I open GarageBand, and then restart my app, all the third-party audio units are in place.


What GarageBand could do to succesfully retrieve the list?

As is turned out the problem was happening because my app did not have an entitlements file with the “Inter-App Audio” capability key. After adding this capability to my project target in xcode the problem is gone.

Thanks for your post - it pointed me to the right direction after trying to get this work for two days!!!