NSExtensionPrincipalClass and AU extension issue on iOS

I'm trying to remove AU extension storyboard from my project as I do all UI stuff programatically. So in the info.plist I replaced this:

<key>NSExtensionMainStoryboard</key>

<string>MainInterface</string>

<key>NSExtensionPointIdentifier</key>

<string>com.apple.AudioUnit-UI</string>


With this:

<key>NSExtensionPointIdentifier</key>

<string>com.apple.AudioUnit-UI</string>

<key>NSExtensionPrincipalClass</key>

<string>MyAUViewController</string>


However, I found that when trying to load the AU in any iOS host they hang forever.

Any ideas why this might be the case? Is this a supported way of loading the AU extension UI?

Answered by NikoloziApps in 213201022

Got it working. Turns out I needed to add @objc(MyAUViewController) in my code.

Accepted Answer

Got it working. Turns out I needed to add @objc(MyAUViewController) in my code.

Yeah that was it for me too, thanks a lot. The whole intent (ui) extension documentation is horrible, especially when you don't want to use storyboards.
NSExtensionPrincipalClass and AU extension issue on iOS
 
 
Q