Workflow to develop & iterate with Audio Units on Logic Pro


I’ve spent some time trying to get a workflow to reload Audio Units without too much struggle on Mac OS, I kept having strange caching issues or wasn’t seeing my changes on each restart of logic, and became a bit paranoid about it. I found out I’m not the only one so sharing some findings.

It seems that the cache is cleared for a newly built audio unit if its version is changed, so my solution to it is as follows (I am using CMake and CLI tools, I guess there is an alternative in other build systems), I add the following at the top of the CMakeLists.txt


message(STATUS "version is set to 0.0.${BUILD_VERSION}")

project(MyPlugin VERSION 0.0.${BUILD_VERSION})

Then, when I develop, I usually build with something like this (this is in a script so I don’t have to type it each time):

cd src/MyPlugin/build && cmake .. && make -j5 ; cd -

Whenever I want to install and try the plugin, I do:

cd src/MyPlugin/build && cmake -DFORCE_CACHE_VERSION .. && make -j5 ; cd -

# here I stop logic

rm -r ~/Library/Audio/Plug-Ins/Components/MyPlugin.component
cp -r src/MyPlugin/build/MyPlugin_artefacts/AU/MyPlugin.component ~/Library/Audio/Plug-Ins/Components/MyPlugin.component

# here I start logic, plugin is consistently at the freshly built version :-)

One downside is that on each install, the entire thing has to be rebuilt (not just the recent changes), so it takes some time, but at least doesn’t involve restarting the OS. Maybe there is a faster way to change the version without rebuilding everything?

Another downside is that the version ends up being like 0.0.<BIG_NUMBER>, which is considered invalid in Logic when you look at the plugin manager (but works fine and is loading properly). I additionally print the build date on the plugin editor UI just to confirm it is fresh:

  g.drawSingleLineText(__DATE__ " - " __TIME__, 25, 25);

If there is a better solution to this approach in general, I’d gladly take it!

Have a look here.