简体   繁体   中英

How to make an iOS app recognized as AudioUnit?

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>

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"

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM