以下代码在调试模式下工作正常。生成构建后无法正常运行
const path = Image.resolveAssetSource(require(./share.png)).uri
const configOptions = { fileCache: true }
RNFetchBlob.config(configOptions)
.fetch('GET', path)
.then(resp => resp.readFile('base64'))
.then(async (base64) => {
const base64Data = `data:image/png;base64,${base64}`
const shareOptions = {
message: "Hello World!",
url: base64Data
}
Share.open(shareOptions)
.catch((_) => {
// When user cancel share options
})
})