I remember it being difficult to get this “working” initially, and it seems I didn’t completely succeed.
If I generate an AUv3 project via the Projucer and open it in Xcode, I can see that the ‘Mach-O Type’ for the target is “Executable” rather than “Bundle”. If I create a
MODULE target I can set
XCODE_ATTRIBUTE_MACH_O_TYPE to emulate this behaviour, but then CMake will still (incorrectly?) add
-bundle to the linkline for the target, causing the build to fail (
bundle can’t both be enabled simultaneously).
I just tried adding the target as an executable target, but setting
XCODE_PRODUCT_TYPE com.apple.product-type.app-extension. This seems to generate a working project which builds for both the simulator and for devices. The “General” tab for the AUv3 no longer looks like an exe target. I’m then able to install the app on an iPhone, and I can see+use the app extension in GarageBand.
I’ll push this change, as it seems a bit cleaner than my previous approach. Open to any suggestions for alternative approaches though!