includable / react-native-email-link

📭 Open an email client from React Native (for 'magic link' type functionality).

Home Page:https://includable.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't catch error if no Email client

dbilgin opened this issue · comments

Hi there, I can't seem to catch any errors when there was no email client on my iOS simulator.

  async openEmail() {
    try {
      await openInbox({
        message: 'select',
        cancelLabel: 'cancel',
      });
    } catch (error) {
      alert();
    }
  }

It doesn't get to the catch statement at all, but I do get a warning on the simulator as below:

Screenshot 2020-05-11 at 12 18 37

Am I doing something wrong or is there a problem here?

Good catch! (sorry, I couldn't resist 😄)

I think I found the problem, and just released react-native-email-link@1.8.2 that hopefully fixes it. Would you mind giving it a try? Don't have a dev environment set up to test it myself at the moment.

😄 my pleasure! @tschoffelen
And I just tried it and it seems it's fixed, thanks a lot for the fast response!

Happy to hear!