Open SyedShahbazHussain opened 3 years ago
Try using RNFetchBlob.ios.openDocument(path) outside the writeFile Function and put them inside timeout to give it chance to refresh the process
setTimeout(() => { RNFetchBlob.fs.writeFile(path, data, 'base64'); RNFetchBlob.ios.previewDocument(path); },2000);
Hello, I am currently having the same problem. My files always have 0 Kb on iOS. Everything works fine on Android.
Hi!
For ios try use cache directory for save files dirs.CacheDir
and open it as RNFetchBlob.ios.openDocument(path)
I'm having the same issue using an analytics package alongside rn-fetch-blob. What currently worked was to disable CLang Optimization flags for the rn-fetch-blob in Release. Do you mind trying as well?
Hi! For ios try use cache directory for save files
dirs.CacheDir
and open it asRNFetchBlob.ios.openDocument(path)
This solution worked for me too
is someone still facing this issue?
Hello @hashkazi00 yes, am facing the issue. Can't find the file in simulator . When I include RNFetchBlob.ios.openDocument(path), the app crashes on download
setTimeout(() => { RNFetchBlob.fs.writeFile(path, data, 'base64'); RNFetchBlob.ios.previewDocument(path); },2000);
@edwinx29 I'm facing a similar issue. Would I want to call writeFile()
once before calling it again in the timeout function (see code below) or only make the call in the timeout function?
await RNFetchBlob.fs.writeFile(path, this.state.base64, 'base64')
setTimeout(() => { RNFetchBlob.fs.writeFile(path, data, 'base64'); RNFetchBlob.ios.previewDocument(path); },2000);
Using RNFetchBlob.ios.openDocument and RNFetchBlob.ios.previewDocument in ios, Working fine on debugging mode but not working in release. ReactNative: 0.60.5 rn-fetch-blob: 0.12.0