AlertWindow with text box async?

I’m trying to create a small window with a text box and cancel & ok buttons, and then show it asynchronously in an iOS app & plugin and I’m stumped.

AlertWindow lets you create a custom alert with the required components, but I can’t figure out a way to show it async. All the async methods don’t seem to allow a custom alert.

On a side note, it seems that all the static AlertWindow async methods are the exact same thing as the NativeMessageBox class. I’m confused.

I have exactly such an editor AlertWindow in my PluginGuiMagic, so I checked how I did it back then:

enterModalState() is available even when JUCE_MODAL_LOOPS_PERMITTED is not set.

This makes the component modal, so that messages are blocked from reaching any components other than this one and its children, but unlike runModalLoop(), this method returns immediately.

This is how it works for me:

Ah! I always forget to look at the parent classes…wouldn’t have thought that Component had that.

Thanks @Daniel!

Sorry to revive this thread, but I can’t find a way to show up an AlertWindow at all on iOS 16, AUv3 version of the product. Standalone app works fine, but from inside a DAW looks like no modal dialogs are permitted. Is there any way to do that?