Upon upgrading from 0.10.13 to 0.10.14, saving to a specified file on IOS has stopped working.
let fullPath = RNFetchBlob.fs.dirs.DocumentDir + '/test.txt';
let res = await RNFetchBlob
.config({ path: fullPath })
.fetch('GET', 'https://raw.githubusercontent.com/joltup/rn-fetch-blob/master/.gitignore');
console.warn(fullPath);
console.warn(res.path());
console.warn(res.info());
Under both versions, the first two logs give the same result (something like [...]/Library/Developer/CoreSimulator/Devices/F3CE7938-1974-467C-8183-C1F98AC74CCE/data/Containers/Data/Application/8F3721D5-7CC6-4CEC-8D96-1AB6B4CB26E6/Documents/test.txt) and the last yields an object with the appropriate information (including status: 200).
If I navigate to [...]/Documents/ folder when the app is built with 0.10.13, text.txt exists. However, under 0.10.14, the folder remains empty.
Same this issue when I upgrade from 0.10.13 to 0.10.14
Reverting to 0.10.13 fixes it and works perfectly for both operating systems for us.
Same issue for new version






@Traviskn
+1
0.10.14 causes a bug: https://github.com/wonday/react-native-pdf/issues/286
Can confirm with both 'fileCache: true' and 'path: randomPath' options, on iOS 12.0, RN-fetch-blob 0.10.14 and RN ^0.55
Same here, went back to 0.10.13
Removed a piece of code responsible for saving the file to disk...
All broke their new vision ((( And the most interesting, why?
https://github.com/joltup/rn-fetch-blob/commit/3aec4191f9661b78f5baf85da3f99ca1bd467a10#diff-f27851ca66016d2a5936b4dc68144330
@Traviskn need your help
@legion-zver Thanks for finding the root cause, I should have been more thorough in my code review before merging #198 I think I'll revert that merge
I have reverted #198 and published a new release, so file saving should be working again
@Traviskn seems still not working
Same, reverting to 0.10.13 fixed it for me
update to 0.10.15 fixed it for me.
I'm in RN 0.57 and rn-fetch-blob 0.10.15. So when i try to download directly to a file with path: it returns response.path() correctly but there's no file. I don't know if i'm doing something wrong 馃槥 . I'm saving at DocumentDir on iOS.
EDIT:
i've solved this by using WRITE_EXTERNAL_STORAGE permission on Android.
And using this keys in info.plist for iOS:
<key> UIFileSharingEnabled</key>
<true/>
<key>LSSupportsOpeningDocumentsInPlace</key>
<true/>
As described here, to enable file sharing in the app Document folder.
For those who are still strugling with this, I'm using CameraRoll on iOS to save image since it supports by default:
On iOS, the tag can be any image URI (including local, remote asset-library and base64 data URIs) or a local video file URI (remote or data URIs are not supported for saving video at this time).
If the tag has a file extension of .mov or .mp4, it will be inferred as a video. Otherwise it will be treated as a photo. To override the automatic choice, you can pass an optional type parameter that must be one of 'photo' or 'video'.
CameraRoll.saveToCameraRoll(
'https://url.com/picture.jpg',
).then(Alert.alert('Success', 'Photo added to camera roll!'));
same here
Go to info.plist and add key "Application supports iTunes file sharing" and set Boolean value to YES. You will be able to see your downloads in "Files" of your iPhone.

I'm still facing this issue on 0.12.0 release. I'm trying download file in ios simulator 14.
let PictureDir = fs.dirs.PictureDir;
let options = {
fileCache: true,
appendExt: 'png',
path: PictureDir + '/image_' + Math.floor(date.getTime()) + ext,
addAndroidDownloads: {
//Related to the Android only
useDownloadManager: true,
notification: true,
path:
PictureDir +
'/image_' +
Math.floor(date.getTime() + date.getSeconds() / 2) +
ext,
description: 'Image',
},
};
Above are my configs. Any help on this will be appreciated?
` const { dirs } = RNFetchBlob.fs;
RNFetchBlob.config({
fileCache: true,
notification: true,
path: RNFetchBlob.fs.dirs.DocumentDir+"/taskmanagementApp/"+Math.random().toString(36)+fileName[2],
})`
Please help god knows where it's saving in the emulator.
Most helpful comment
Reverting to 0.10.13 fixes it and works perfectly for both operating systems for us.