AUV3 hosting on iOS


I see that Juce version 4.2 added support for Audio Unit V3 on iOS. Does this also include hosting?

Yes, it does!

And, running the risk of you telling me to get off my backside and find out for myself, does it also provide the mechanism which allows the host app to render the plugin’s UI as if it’s ‘embedded’ within the host?

Yep, that’s right.

Brilliant, you’ve inspired me to give it a whirl but I’ve run into a couple of build problems. This is what I’ve done:

  • Got the latest Juce-master as a zip file from GitHub (this morning)
  • Built Projucer
  • Loaded the audio plugin host demo project and added an iOS target
  • Chose ‘save project and open in IDE’
  • Disabled VST plugin support by hacking AppConfig.h
  • In Xcode, started an iOS build for an iPad Air 2 target

There seem to be a couple of compilation errors in due to the use of ‘NSViewController’. I went with Xcode’s suggestion of changing them to ‘UIViewController’, which I’ve no idea is appropriate but that got me to the linker, which seems to be unhappy about not being able to find the AudioUnit framework (full log below). It’s strange, the framework seems to be there and if I look at its properties it seems to be the right one (ie. the one from iPhoneIS9.3.sdk). I’ve tried removing/re-adding it in Xcode with clean builds in between but still the same problem.

I’m on Xcode 7.3. Let me know if you want me to try anything …

Ld build/Debug/Plugin\\ Host normal arm64
    cd "/Users/Me/Desktop/JUCE-master/examples/audio plugin host/Builds/iOS"
    export PATH="/Applications/"
    /Applications/ -arch arm64 -isysroot /Applications/ -L/Users/mborstel/Desktop/JUCE-master/examples/audio\ plugin\ host/Builds/iOS/build/Debug -F/Users/mborstel/Desktop/JUCE-master/examples/audio\ plugin\ host/Builds/iOS/build/Debug -filelist /Users/mborstel/Desktop/JUCE-master/examples/audio\ plugin\ host/Builds/iOS/build/Plugin\\ Host\ (App).build/Objects-normal/arm64/Plugin\ Host.LinkFileList -miphoneos-version-min=9.3 -dead_strip -Xlinker -no_deduplicate -fembed-bitcode-marker -framework AudioUnit -framework Accelerate -framework AudioToolbox -framework AVFoundation -framework CoreAudio -framework CoreAudioKit -framework CoreGraphics -framework CoreMIDI -framework CoreText -framework Foundation -framework OpenGLES -framework QuartzCore -framework UIKit -Xlinker -dependency_info -Xlinker /Users/mborstel/Desktop/JUCE-master/examples/audio\ plugin\ host/Builds/iOS/build/Plugin\\ Host\ (App).build/Objects-normal/arm64/Plugin\ Host_dependency_info.dat -o /Users/mborstel/Desktop/JUCE-master/examples/audio\ plugin\ host/Builds/iOS/build/Debug/Plugin\\ Host

ld: framework not found AudioUnit
clang: error: linker command failed with exit code 1 (use -v to see invocation)

OK this is fixed on the develop branch. I just tried the “audio plugin host” sample and was surprised that it actually works on our iPad mini 2 - albeit being nearly impossible to control with my fat fingers :-). I was able to hook up the JuceDemoPlugin :slight_smile:. See screenshot below:


was surprised that it works quite well

Yeah I think I still code for those moments of surprise. Like spending a week writing a new renderer before you can run it. Nine times out of ten you’ll just get a black screen if you’re lucky, but one time in ten it’ll pop into life first time - can’t beat that feeling!

Well done, I’ll try it out!


Yep I can confirm it works. Some minor display issues with a (or should I say, one of the only) 3rd party plugins but as proof of concept it does the job admirably.

1 Like

FYI the layout issue is actually a bug in the Arturia plugin. In AUv3 the plugin is supposed to resize to fit the host, but they’ve clearly hard-coded their layout to fit GarageBand, and are ignoring the size we’re giving it.

I seem to vaguely remember reading some early docs about AUs on iOS which suggested that they had to adhere to some quite specific dimensions. Although there again that may have been some web article based on what was being seen in Garage Band. Anyway, if resizing is possible that great news for those writing hosts - but possibly a headache for some plugin developers!

There is a new preferredSize call in AUv3 with which you can ask the plug-in for it’s “preferred size”. We don’t have hosting support for that atm but it would be a good idea to add it.