[Bug][iOS] Email.ComposeAsync with modal #1134
Description
Description
When using Email.ComposeAsync on iOS it sometimes hangs due to an access to a view that has been destroyed. A warning is displayed in output :
"Warning: Attempt to present <MFMailComposeViewController: 0x13eb0c000> on <Rg_Plugins_Popup_IOS_Renderers_PopupPageRenderer: 0x13f0f2980> whose view is not in the window hierarchy! ".
It's really easy to workaround, just close your modal after Email.ComposeAsync but this sounds weird to me to use the top level view component (which can disappear) in order to ask iOS to compose email. At least we could expect an exception to be thrown, what do you think?
Steps to Reproduce
- Use a button within a modal (such as a popup from Rg.Plugins.Popup) bound to a command calling Email.ComposeAsync
- When this click is handled close your modal (from xaml.cs for instance)
Expected Behavior
Email.ComposeAsync returns or throws an error
Actual Behavior
Email.ComposeAsync sometimes never returns and no exception is thrown. A warning is displayed saying the renderer is not in the window hierarchy anymore.
Basic Information
- Version with issue: 1.3.1