Porting App to Audio Unit V3 questions

Hello,


I would like to port my app to work as AudioUnit V3 instrument, but going through the documentation I came across some potential obstacles:


As I understand, the app extension must be bundled with the App and provide sound engine and UI. That means the App itself is reduced to a slim host loading an instance of my AudioUnit. Hope I got that right.


Got several problems with that:

- In-App purchases:

Some content needs to be purchased. That means it should be possible to use StoreKit functions from within the extension - is that possible?


Furthermore, as the App is currently already sold, the existing purchases must be respected. As the App and the AU extension will likely have different IDs, I have no idea if that could work. It would be OK if purchases need to be restored within the AU extension.


- Playing:

In the 2015 WWDC video, it was discouraged to offer a keyboard in the custom view as the host / GarageBand shows its own and will not record from the custom view. However, my specific app requires a special UI for playing that is different from a normal keyboard. If I show this, will the host listen and record MIDI from it?


The specific app is called iOptigan, would gladly provide promo code to anyone curious and willing to help.


Regards,

Stefan

Replies

Regarding your first point. You can still handle the in-app purchase stuff in the main app and then extension can be informed that user has made a purchase via group UserDefaults (check out "Sharing Data with Your Containing App" https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/ExtensionScenarios.html)



Also, you can inform the user in the extension to open the app to make the in-app purchase.



As for playing. I think the 2015 advice is a bit outdated. Check the latest Core Audio video from WWDC 2017. The AU extension is allowed to have its own MIDI input UI. And user performance using the extension UI will be recorded as MIDI in the the host. Having said that I don’t think the latest GarageBand supports it yet (though it was demoed during WWDC17). I’m assuming its coming though. Maybe in January, that’s when we usually get big updates for GB and Logic (just in time for NAMM)