react native not open mail app
The code works perfectly the problem was the iOS simulator,
it needs to be tested on a real device.
import {Linking} from 'react-native'
url = 'mailto:message:0';
handlePress(url);
handlePress(url) {
console.log('Trying to access url')
console.log(url)
Linking.canOpenURL(url).then(supported => {
if (!supported) {
console.tron.log('Can\'t handle url: ' + url)
} else {
return Linking.openURL(url)
}
}).catch(err => console.error('An error occurred', err))
}