-
Notifications
You must be signed in to change notification settings - Fork 1.6k
iOS: Lost connection to background transfer service #448
Comments
I'm experiencing the same issue. After setting IOSBackgroundTask to true the task stops uploading upon going into the background and I get the same error. |
Same for me! |
+1 |
Check out the Apple documentation here. Modifying the I don't have time to make a full PR, but you can see how you might pass in the HTTP method down to |
@danielsuo I have updated the files for downloadTaskWithRequest and uploadTaskWithStreamedRequest support. Below is the implementation logic Upload Task :
} Download task :
} I am facing one issue here
In my project Appdelegate : #import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicationDelegate,NSURLSessionDelegate> @Property (nonatomic, strong) UIWindow *window; AppDelegate.m //The backgroundTransferCompletionHandler is the one that is called when all downloads are complete
} |
There are a lot of reasons why |
@danielsuo Thanks for the prompt reply. Any corrections to the changes I have made?. If possible, could you share your part of changes which you made to get it working? |
I actually don't call |
@danielsuo Thanks for your inputs |
Any updates? |
The connection works fine in BG. However, URLSessionDidFinishEventsForBackgroundURLSession is still not called for me. You may refer to the updated code shared by me. I believe, https://stackoverflow.com/questions/32676352/urlsessiondidfinisheventsforbackgroundurlsession-not-calling-objective-c can possibly be looked at to fix the issue. For now, I have skipped that |
I have the issue and I didn't find a solution yet. If you have any update, let me know! |
I have a patched version based on the solution from @iosfitness , but the download progress was broken (referencing bytesWritten / totalBytesWritten rather than totalBytesWritten / totalBytesExpectedToSend) https://github.com/tmaly1980/react-native-fetch-blob I've created a pull request to have it merged into the new repository at: https://github.com/joltup/react-native-fetch-blob |
Hi,
I trying to do a background download on iOS.
this is my config:
When going to the background and back I get an exception:
Lost connection to background transfer service.
I looked everywhere but found no solution.
RNFB v: 0.10.6
RN v: 0.45.1
Thank you.
The text was updated successfully, but these errors were encountered: