react-native-background-downloader icon indicating copy to clipboard operation
react-native-background-downloader copied to clipboard

Test on ios simulator?

Open sjchristi opened this issue 11 months ago • 2 comments

Hi,

This is perhaps more of a question than a bug report. I was trying to test this on iOS simulator. I wanted to test the case of my application being closed while a download was in progress.

So what I did was I launched my app, kicked off a huge download, and then hit the home button twice and swiped up to close my app.

I then reopened my app and I'm calling this API:

    let lostTasks = await RNBackgroundDownloader.checkForExistingDownloads();

And sure enough, there is a task for the download!

Unfortunately, immediately after this, I receive this error:

 LOG  Download canceled due to error:  The operation couldn’t be completed. (NSURLErrorDomain error -999.)

I'm not sure if my testing is throwing things off or if I'm doing something wrong? Is there special handling that I need to do?

Thanks! Sam

sjchristi avatar Mar 01 '24 04:03 sjchristi

Hi, Thanks for the report, I'll look into it

kesha-antonov avatar Mar 07 '24 08:03 kesha-antonov

+1

felipegmg avatar Mar 19 '24 01:03 felipegmg

Fixed by https://github.com/kesha-antonov/react-native-background-downloader/pull/20

kesha-antonov avatar Jul 10 '24 12:07 kesha-antonov