Is there any way to make a window run as modal in a Mac Catalyst app? I have tried everything I could think of, including:
- Detecting a window resigning key and calling
makeKeyon it again. Doesn't work. - Changing the
windowLevelof the window. No effect. - Detecting when a window scene is not key and calling
UIApplication.shared.requestSceneSessionActivationon that session. This one kind of works but I need to delay the call, which means the window is not key for a brief moment, and it also feels glitchy afterwards. - Using a Mac plugin to run
NSApplication.shared.runModal(for: window)andNSApplication.shared.stopModal(). This one does make the window modal but it looks like it breaks some of the actions in the window, buttons stop working.