NativeMessageBox impossible for AUv3

As I can’t wait for JUCE fixes of Fix content sharing from AUv3 iOS

I wanted on the AUv3 to simply show a message box.
But ironically I can’t even do that with the native one! :slight_smile:

        // Since iOS8, alert windows need to be associated with a window, so you need to
       // have at least one window on screen when you use this

So nice assertion but the NativeMessageBox::showMessageBoxAsync doesn’t use the Component* associatedComponent

So it’s pretty much impossible iiuc to show a native dialog on AUv3…

Yes, I just hit this. NativeMessageBox::showOkCancelBox doesn’t use the associatedComponent.
A fix would be nice, or an alternative way to have a native message box?

@reuk has this been fixed yet?

iirc, many of those quirks where fixed/addressed. (at least on latest develop)

but you need to scope things.
I see I’ve used it in the past (for content sharing) but I pretty much remember it was handled.

i don’t think this fixes the sharing issue in auv3 though. i just updated my code to use ScopedMessageBox and it works fine natively but in auv3 my screen just locks up (previously when i tried to do this i’d get a crash). i’m guessing the share dialog is showing in some other window which i can’t access? this is in logic fwiw.

are you keeping the scoped instance? are you providing your parent component?

it might be non-trivial sometimes but it should work.

1 Like

ah! thanks @ttg, i did not notice the parent parameter. using this i can verify that this does indeed work in auv3 now.