Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

why does ios 'email.compose' cause nullexception when including attachment but Android doesnt

$
0
0

Using the experimental
I have this code which sends a gps (track file) via email
Works fine in Android but falls over in the appdelegate of iOs with null exception - its definitely the attachment -remming it out eliminates the issue
var message = new EmailMessage
{
Subject = "Mygps Track",
Body = "My gpx track which can be viewed in google earth"
} ;
ExperimentalFeatures.Enable("EmailAttachments_Experimental");
if (File.Exists(fnm3))
{
message.Attachments.Add(new EmailAttachment(fnm3));
}
await Email.ComposeAsync(message);
//.........................................
Anyone any ideas why it should behave differently with iOs ?

I am checking that the file exists so its not a null attachment or anything like that
I am stumped - anyone have any ideas ? I know I am using the 'experimental'stuff but does this not work in iOs?


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>