Closed ashfurrow closed 4 years ago
Instead, you have to
.catch()
on the promise returned fromLinking.openURL()
, which felt pretty dirty to me. So I wrote a small native function to use the nativeMFMailComposeViewController
.
Agreed this is much better.
:rocket: PR was released in v1.21.8 :rocket:
Also updates to use the new Palette Settings icon (see: https://github.com/artsy/palette/pull/625).
I feel like I have some 'splaining to do on this PR 😅 The iOS email compose API is specific enough to iOS that React Native doesn't support it specifically. The only way to open the email compose sheet is to use React Native's
Linking
module with amailto:address@example.com?subject=...
URL. Feels weird, but that's fine. The problem is that not all iOS devices are configured with an email account. iOS has a[MFMailComposeViewController canSendMail]
method that you can query, but no such method existing in React Native. Instead, you have to.catch()
on the promise returned fromLinking.openURL()
, which felt pretty dirty to me. So I wrote a small native function to use the nativeMFMailComposeViewController
.Here's the new Privacy Request view:
Tapping "Privacy Policy" will open this modal:
Tapping on the other links in the simulator will show this error, because the simulator can't open email compose views. It should open the mail compose view when tapped on devices.