1

I'm trying to make a minimal iOS plugin from scratch. Starting from an empty iOS app (Swift 5, XCode 12.5), I thought it would suffice to add the following dict to the project's Info.plist to make it recognized as an AudioPlugin, but, having installed it, AUM (or any other AUv3 host) doesn't list the app.

What's needed to make ad app recognized as plugin?

<dict>
    <key>NSExtensionAttributes</key>
    <dict>
        <key>AudioComponents</key>
        <array>
            <dict>
                <key>description</key>
                <string>MIDIAudioUnit</string>
                <key>factoryFunction</key>
                <string>$(PRODUCT_MODULE_NAME).AudioUnitViewController</string>
                <key>manufacturer</key>
                <string>INQS</string>
                <key>name</key>
                <string>MIDIAudioUnit</string>
                <key>sandboxSafe</key>
                <true/>
                <key>subtype</key>
                <string>aumi</string>
                <key>tags</key>
                <array>
                    <string>Synthesizer</string>
                </array>
                <key>type</key>
                <string>aumi</string>
                <key>version</key>
                <real>67072</real>
            </dict>
        </array>
    </dict>
    <key>NSExtensionMainStoryboard</key>
    <string>MainInterface</string>
    <key>NSExtensionPointIdentifier</key>
    <string>com.apple.AudioUnit-UI</string>
</dict>
pistacchio
  • 56,889
  • 107
  • 278
  • 420

2 Answers2

1

Starting from scratch:

  1. Create new/blank iOS app
  2. Add new target (type: Audio Unit Extension)
  3. Add new audio unit extension target to original parent app's target in "Frameworks, Libraries, and Embedded Content" section.

The target you create in step 2 will be the one that has the Info.plist that has the keys you listed -- not the parent app.

Also, make sure that your Audio Unit extension's bundle ID starts with your parent app ID:

com.jnpdx.StackOverflowPlayground.AudioUnitParentApp //parent
com.jnpdx.StackOverflowPlayground.AudioUnitParentApp.AudioUnit // child

Assuming that your audio unit is of the "Generator" type, it'll appear in AUM under "MIDI"

jnpdx
  • 45,847
  • 6
  • 64
  • 94
  • Thank you so much, this works perfectly. If I can ask you one more thing. I already have an audio app (published on the app store) that I'm trying to convert to AUv3. How can I re-use all the code I have and have the app run both standalone and as a AU plugin? – pistacchio Mar 21 '21 at 19:21
  • 1
    The quickest and dirtiest way: add all of the necessary source files to the AU target as well as your main app target. The cleaner way: create a new framework target that contains all of the code that will be shared between the app and the extension. Then, add that framework gets imported by both the app and extension. – jnpdx Mar 21 '21 at 19:26
0

I figured that AUM doesn't show AUs with aumi type anywhere. Try aumu (music device) instead.

vadimrostok
  • 131
  • 7