React native 在ios上的react native share中,我们需要知道为什么股票期权弹出屏幕会立即消失?
在这种情况下,当我们单击共享按钮时,会弹出共享屏幕,但会立即被取消。为此,我们还使用share.open(ShareOptions),但找到了相同的结果React native 在ios上的react native share中,我们需要知道为什么股票期权弹出屏幕会立即消失?,react-native,react-native-android,react-native-ios,React Native,React Native Android,React Native Ios,在这种情况下,当我们单击共享按钮时,会弹出共享屏幕,但会立即被取消。为此,我们还使用share.open(ShareOptions),但找到了相同的结果 composeEmail = async () => { const file = await this.downloadCsv(); const res = await RNFetchBlob.fs.exists(file.path); if (res) { con
composeEmail = async () => {
const file = await this.downloadCsv();
const res = await RNFetchBlob.fs.exists(file.path);
if (res) {
const data = await RNFetchBlob.fs.readFile(file.path, 'base64');
console.log("encoded data", data)
if (Platform.OS === "ios") {
const shareOptions = {
social: Share.Social.EMAIL,
subject: '',
filename: file.filename.split(".")[0],
saveToFiles: file.path,
url: file.path,
type: 'csv',
failOnCancel: true,
}
try {
const ShareResponse = await Share.shareSingle(shareOptions);
} catch (error) {
console.log('Error:', error)
}
}