2

In Xamarin Forms I have added a gesture recognizer to let a user click on an email address label and have it open an email application.

On Android this works, the user is asked of they want to open in gmail or an email application, but nothing happens on ios.

Is there something ios-specific I have to do to handle this?

var emailGestureRecognizer = new TapGestureRecognizer(); emailGestureRecognizer.Tapped += (s, e) => { Device.OpenUri(new Uri("mailto:" + venue.ContactEmail)); }; ContactLabel.GestureRecognizers.Add(emailGestureRecognizer); 
2
  • 2
    are you testing on the simulator? It doesn't have an e-mail app, use a real device instead Commented Jul 24, 2018 at 13:32
  • yeah just a simulator for the moment, will give it a go on a device, thanks Commented Jul 24, 2018 at 13:34

1 Answer 1

1

Based on the Apple documentation, this is correct.

iOS Note: If the Mail app is not installed, clicking a mailto URL displays an appropriate warning message to the user.

Since the Mail (and Phone and possibly others) app is not installed on the Simulator, these links will not work.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.