Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

background download is not working at all in iOS. #696

Open
kp72-dev opened this issue Nov 19, 2020 · 1 comment
Open

background download is not working at all in iOS. #696

kp72-dev opened this issue Nov 19, 2020 · 1 comment

Comments

@kp72-dev
Copy link

kp72-dev commented Nov 19, 2020

**Possible Unhandled Promise Rejection (id: 14):
Error: Lost connection to background transfer service
http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:178977:34
__invokeCallback@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:2848:23
http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:2553:34
__guard@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:2761:15
invokeCallbackAndReturnFlushedQueue@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false:2552:21
invokeCallbackAndReturnFlushedQueue@[native code]**

It is my error.
i have tried all the solutions from issues and suggestion of other users but not affection at all.

Here is my CODE.

RNFetchBlob
                .config({
                    IOSBackgroundTask:true,
                    // add this option that makes response data to be stored as a file,
                    // this is much more performant.
                    fileCache: true,
                    indicator:true,
                    path: dirs + fileName
                })
                .fetch('GET', file.title, {
                    //some headers ..
                })
                .then((res) => {
                   
                    console.log('The file saved to ', res.path())
                })

Tried solutions.
https://koenig-media.raywenderlich.com/uploads/2016/09/BM-EnableBackgroundFetch.png
#20
#234
#20
wkh237#448
Help if anyone can...
@joltup

@annucy
Copy link

annucy commented Sep 27, 2021

You can try the solution mentioned in #426.

Not completely understood the solution. But it worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants