Alert not shown on iOS on top of modal
With Nativescript 6.2 and iOS 13 the dialog will not show if it is opened on top of a modal.
I supect, that it opens behind the modal or not at all, but no error is thrown.
This is works as expected on Android.
I found part of the issue:
The alerts are called with the wrong view controller as the viewcontroller is found with this line:
var viewController = frame.topmost().currentPage.ios;
However, this ignores modals. I am able to get (probably the right view controller:
var viewController = frame.topmost().currentPage.modal ? frame.topmost().currentPage.modal.ios : frame.topmost().currentPage.ios;
Sadly using this viewcontroller to call:
viewController.presentViewControllerAnimatedCompletion(_this._alertController, true, null);
leads to an exception saying that presentViewControllerAnimatedCompletion is undefinied. Something is wrong with the viewcontroller of the modal it seems