Bug 58933 - MFMailComposeViewController is not showed after call await DisplayActionSheet
Summary: MFMailComposeViewController is not showed after call await DisplayActionSheet
Status: RESOLVED NORESPONSE
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-08-21 17:58 UTC by Fernando Javier Sosa
Modified: 2017-09-21 15:43 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description Fernando Javier Sosa 2017-08-21 17:58:37 UTC
I had problems with my attemps to send and email just after to ask a question to the 
user using await DisplayActionSheet();

The expected result is the email view on the top of the screen to allow the user to send some info
The result obtained is: nothing happens after the user selection in the ActionSheet. 
Android works fine.

These are my attemps to repoduce this issue:

1) in the PCL Project do this call:

var action = await DisplayActionSheet(....);

DependencyService.Get<IEmailService>().sendMail(...whathever you need to send an email...)

in the iOS Implementation of the Service:


var vc = UIApplication.SharedApplication.KeyWindow.RootViewController; 
vc.InvokeOnMainThread(
 delegate{
     //Create the MFMailComposeViewController, 
     //check if the service is available, 
     //set the Finish EventHandler
     
     //and finally
     vc.PresentViewController(....);
});
Comment 1 Paul DiPietro [MSFT] 2017-08-21 18:01:52 UTC
Hi, could you please upload a minimized reproduction project and verify that the issue does not occur on the latest prerelease or nightly build? Thanks!
Comment 2 Fernando Javier Sosa 2017-08-22 13:48:29 UTC
Hi Paul, thank you for your quick response, now I need to move forward with my project, I have a dead line and I need to finish this ASAP.
My Workaround for this will be an specific implementation for IOS that show a UIAlertController with an event that is fired when the user select any of the options.

I don't have the time for now to build and test a project, I think the problem is with the standard implementation of the ActionSheet for iOS. 

As an "a side note": the problem can be also reproduced if you try to show an UIDocumentInteractionController (iOS Code) after call "await DisplayActionSheet(...)" in the PCL code. I've checked the thread where the view is showed (and I try to force the execution on the main thread), but nothing happens.

Maybe this is something fixed in the latest prerelease, but honestly I cannot do that test now, maybe I can help you after my dead line. my aplogies for this.

Thank you so much.
Fernando Sosa.
Comment 3 Paul DiPietro [MSFT] 2017-09-21 15:43:54 UTC
As it has been over a month, please reopen this if the issue still occurs as of the latest 2.4.0-pre3 build and you (or someone else) is able to provide a reproduction for us to look at. Thanks!