rn-fetch-blob
rn-fetch-blob copied to clipboard
IOSBackgroundTask breaks downloads
Is there anything else I need to do in order to get background tasks working on iOS, there's not really any documentation?
Downloading files works as expected without this option however fails to work if I set IOSBackgroundTask: true.
-
please provide the version of installed library and RN project. "react-native": "0.55.4", "react-native-fetch-blob": "^0.10.8",
-
a sample code snippet/repository is very helpful to spotting the problem.
return RNFetchBlob
.config({
IOSBackgroundTask: true, //onProgress called if this is false
path: toFile,
overwrite: true,
indicator: true,
})
.fetch('GET', fromUrl, {
//some headers ..
})
.progress((written) => onProgress(_path,written))
.then((res) => {
API.log(`Downloaded ${fromUrl} to ${toFile}`)
}).catch((err) => {
API.log(`Error downloading ${fromUrl} to ${toFile}`, err)
return err;
})
the exactly same thing is happening with me
Same here too. With IOSBackgroundTask: true
or without, if app go to background the download stops. However, background download works well on Android.
Same problem like @PierreBresson
same problem.
does anyone know a better library? this one seems poorly-supported.
I am also having same issue.
any solution or other library?