Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to handle mailto without an email setup

Discussion in 'iOS and tvOS' started by Carwashh, Nov 2, 2020.

  1. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    760
    Yo

    I'm working on an app atm, that has a 'Contact Support' button. When tapped, this button opens the users email compose with few things auto filled out.

    However, if the user doesn't have an email account setup on their device, tapping the button currently does nothing. Is there a way to detect this ? We have a URL to open instead as a fall back, so I'd like to know when the email fails to open and display the web site instead, handling it gracefully for the user.
     
  2. kaarloew

    kaarloew

    Joined:
    Nov 1, 2018
    Posts:
    360
    Carwashh likes this.