Skip to content

Adding iOS background download/upload support #50

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

Closed
wants to merge 9 commits into from
Closed

Adding iOS background download/upload support #50

wants to merge 9 commits into from

Conversation

tmaly1980
Copy link

@tmaly1980 tmaly1980 commented May 21, 2018

This adds IOSDownloadTask and IOSUploadTask options so we can transfer files when the app is in the background. Otherwise, the file transfer is halted when not in the foreground and a "Lost connection to background transfer service" error is thrown when the app is resumed.

Borrowed most of the code from #20 , but the progress handler for downloads needed fixing. Also needed to comment out the references to AppDelegate as I wasn't sure how to get that working.

tmaly1980 added 9 commits May 17, 2018 18:32
Adding background upload/download support
Adding background uploading/downloading functionality
Fixing progress handler for downloading (totalBytesWritten / totalBytesExpectedToWrite)
Adding IOSDownloadTask and IOSUploadTask documentation for background downloading/uploading on iOS
Adding table of content item to iOS background downloading/uploading
Fixing closing file handle once completed (otherwise, can't be opened until app is killed/reopened)
@spiralman
Copy link

Is there any update on the status of this PR? This issue definitely reduces the usefulness of this library.

@Traviskn
Copy link

we've just merged the 0.10.9 branch into master as that was the active development branch before. We'll need to resolve merge conflicts to get move forward with this PR.

@otaviogaiao
Copy link

This would be really useful!!!

@pribeh
Copy link

pribeh commented Jul 27, 2018

Would love to switch to this branch when the conflicts are resolved.

@Yunnathai
Copy link

@Traviskn what is now?this PR. really need it。

@Traviskn
Copy link

Traviskn commented Sep 4, 2018

@jamninetyfive this PR has merge conflicts that need to be resolved. Anyone who needs this PR is welcome to fork @tmaly1980's repo, resolve the conflicts, and re-open the PR. Or perhaps submit a PR of your own!

@cristianoccazinsp
Copy link

Sorry to bring this up, but is IOSBackgroundTask actually working? Looks like it was never resolved, even if it says merged.

@ChristinaPopova
Copy link

Hi, guys!
Thanks for the awesome library!
Could you clarify is iOS background upload support available on latest version (0.12.0)?
Unfortunately it doesn't work for me.

@venkataluri
Copy link

Hi,
I am also looking for IOS background upload support, here is my code
RNFetchBlob.config({ IOSBackgroundTask: true, }) .fetch('POST', videoPath, { 'ClientToken': access_token, 'Content-Type' : 'application/octet-stream', }, RNFetchBlob.wrap(fileUrl)) .then((res) => { console.log('res',res.text()) }) .catch((err) => { console.log('err',err) })

while uploading data to server, if application is moved to background and again brining back to foreground RNFetchBlob callbacks are not getting called and showing loading continuously.

can anyone help me to fix this issue

Thanks

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

Successfully merging this pull request may close these issues.

9 participants