arlomedia
arlomedia

Reputation: 9071

Audio unit v3 extension doesn't appear in host apps

I'm trying to add an audio unit extension to my iOS app. I used File > New > Target > Audio Unit Extension in Xcode to use the built-in template, filled in the info to populate the Info.plist file, and built and ran my app. Even though the audio unit doesn't do anything yet, I expected that the audio unit would be visible to host apps at this point, but it's not.

I downloaded and ran Apple's FilterDemo app, which creates an audio unit extension similar to what I got from the Xcode template, and that appears in host apps (I'm using Auria as a host to test the audio units).

I've tried running my app's main target, or running the extension target and selecting Auria as the host app, but neither works. When running the FilterDemo app, I just ran the main target and that worked.

I went through the Info.plist and build settings comparing the FilterDemo to my app, but I didn't see any significant differences. I also opened the Xcode build folder and viewed the app package that I'm running in debug mode and confirmed that my audio unit extension (.appex package) is there in the Plugins folder.

In the Info.plist file, my extension type is augn (generator), manufacturer is Test and description is Share Audio. I experimented with some changes to these settings, but that didn't help.

I thought the existing Inter-App Audio functionality might be interfering, so I removed the AudioComponents section from the container app's Info.plist file. That made the IAA component disappear from host apps, but didn't make the AUv3 component appear.

I've read through the App Extension Programming Guide, the AUAudioUnit class reference, this tutorial and this one, and the transcript of the WWDC introduction of this functionality, but none of them mention any extra steps needed to make the extension visible to host apps.

What am I missing?

Upvotes: 2

Views: 1067

Answers (2)

Bob Holmes
Bob Holmes

Reputation: 1

This problem can happen if the app does not have permission. You might need to check the security in the settings. The AUV3 extension will not show unless it has been manually approved in the settings of the iPad. The XCode app that is uploaded to the device needs the be trusted. This is what I did when the extension did not show in Garageband. Might not be the reason for you.

Upvotes: 0

Ráfagan
Ráfagan

Reputation: 2255

You should run first of all the app installation and then the extension:

  1. Create an empty iOS project, you can name it HostAU
  2. Create an Audio Unit Extension target for iOS named EffectAU
  3. Set Audio Unit Type as Effect, Subtype Code as something like oiuy, and Manufacturer Code as something like Oiuy
  4. Then run HostAU in your iOS device
  5. After run EffectAU selecting Garage Band as target (make sure you have it installed in your iOS device)
  6. In Garage Band select any instrument, press button settings to show it on the left side and find for "PLUG-INS & EQ" section.
  7. Press this bar to edit and press edit at the top, then press any plus green button to add a new one.
  8. Find the Audio Unit Extension segmented control option at top and then you'll be able to see your Audion Unit Extension icon, name and Manufacturer Code

The same process works in MacOS, but you should create and empty MacOs project and a MacOS Audio Unit Extension target. If you're using MacOS Catalyst, create two Audio Unit Extensions for both platforms and configure which one will be used for which platform in Project > Build Phases > "Embed App Extensions".

When you run the extension target MacOS Garage Band, make sure you have AudioUnit menu enabled at Preferences > Audio/Midi > Enable Audio Units. An then configure it at bottom in Track > Plug-ins > Audio Units > {Manufacturer Code} > {Audio Unit Extension Name}.

In MacOS, the shell commands pluginkit -m and auval -a helps you to check if the plugin is installed in MacOS and if the audio unit was recognized, respectively.

I've done that experiment using MacOS 11.6, iOS 15.0.1, MacOS GarageBand 10.4.3, iOS GarageBand later 2021-10 and Xcode 13.0.

Upvotes: 4

Related Questions