ttg
September 9, 2022, 7:28am
1
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!
// 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?
ttg
August 3, 2023, 8:48am
4
iirc, many of those quirks where fixed/addressed. (at least on latest develop)
committed 09:00PM - 22 Feb 23 UTC
The biggest new feature in this commit is the addition of
NativeMessageBox::scop… edAsync and AlertWindow::scopedAsync, both of
which return an instance of ScopedMessageBox that will hide the message
box in its destructor.
The code for displaying modal dialogs on Windows has also been updated.
Now, the dialog itself is run from a new thread with its own message
loop. This means that when the dialog is dismissed, the background
thread can be joined safely. In plugins, this means that there's no
danger of the plugin view being destroyed from within the message box
runloop, for example.
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.
committed 02:56PM - 19 Apr 23 UTC
modosc
September 4, 2023, 10:41pm
5
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.
ttg
September 7, 2023, 1:38pm
6
are you keeping the scoped instance? are you providing your parent component?
it might be non-trivial sometimes but it should work.
1 Like
modosc
September 10, 2023, 11:24pm
7
ah! thanks @ttg , i did not notice the parent
parameter. using this i can verify that this does indeed work in auv3 now.