RNFetchBlob.ios.openDocument and RNFetchBlob.ios.previewDocument not working in release but working fine on debugging.
See original GitHub issueUsing 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
const fileName = `abcFile.pdf`
const dirs = RNFetchBlob.fs.dirs
const path = dirs.DocumentDir+fileName;
RNFetchBlob.fs.writeFile(path, this.state.base64, 'base64') .then((res) => {
RNFetchBlob.ios.openDocument(path)
// RNFetchBlob.ios.previewDocument(path)
}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:8
Top Results From Across the Web
react-native-fetch-blob IOS API openDocument not working
I was able to resolve the issue , but i don't know why it actually happened in the first place. I used an...
Read more >Download a pdf with rn-fetch-blob (IOS) : r/reactnative - Reddit
Hello everyone, I have implemented a download pdf from url with react-native and rn-fetch-blob. I the download is working fine for Android.
Read more >rn-fetch-blob - npm
A module provides upload, download, and files access API. Supports file stream read/write for process large files.. Latest version: 0.12.0, ...
Read more >Download Files in React Native with RNFetchBlob
Download Files in React Native with RNFetchBlob ... (TLDR; yarn add rn-fetch-blob ). ... Downloads on iOS work a bit differently.
Read more >react-native-fetch-blob: Versions - Openbase
Fix #266 IOS but which causes app crash when it failed to read the file from ... Add prelink script for compatible to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
is someone still facing this issue?
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);