I have some code that asynchronously checks for errors and if an error happens, it shows an alert using window.rootViewController?.present(...)
Sometimes, this happens right before a view controller is presented, so the alert is shown for a split second and then the new view controller goes on top of it.
The thing is that the new VC is also presented asynchronously (ie, when an HTTP request finishes).
Is there a way to make alerts really modal? How to approach this?