I am using react-native-fetch-blob to download excel file and these files are stored inside app/documents folder which I am not able to open in iphone and I don't know the absolute path of the iphone's document folder to save the file there.
here is my code:
downloadFile(){
const dirs = RNFetchBlob.fs.dirs;
let context = this,
userBarRelationId = context.state.userBarId;
RNFetchBlob
.config({
fileCache : true,
path : dirs.DocumentDir + '/excel.xlsx'
})
.fetch('GET', 'http://localhost:5000/getExcel/'+userBarRelationId, {
})
.then((res) => {
console.log('The file saved to ', res.path(), res.data)
})
}