Closed frantic closed 8 years ago
Hi @frantic
Thanks for the warning, I've changed the code of react-native-send-intent module to:
var SendIntentAndroid = {
TEXT_PLAIN: (Platform.OS === 'android') ? RNSendIntentAndroid.TEXT_PLAIN : 'text/plain',
TEXT_HTML: (Platform.OS === 'android') ? RNSendIntentAndroid.TEXT_HTML : 'text/html',
.....
}
Can you update the module install and test it again?
When requiring this module from iOS codebase (that doesn't have
SendIntentAndroid
) "Undefined is not an object" is thrown.Please consider making it safe to require from both platforms, so that the end used doesn't have to add
if (Platform.OS === 'android') { require('react-native-send-intent'); }
(which will stop working if RN transitions to ES6 modules).