Giter Club home page Giter Club logo

Comments (10)

mzeeshanid avatar mzeeshanid commented on May 25, 2024

I'd like to be able to let the user exit the app during the downloads
Did you mean force quit the app? Or did you mean when app is in background?

from mzdownloadmanager.

andrealufino avatar andrealufino commented on May 25, 2024

App in background, not force quit

from mzdownloadmanager.

mzeeshanid avatar mzeeshanid commented on May 25, 2024

If it is working in simulator then it should also work in real device. I am not sure whats going on.
Make sure that background modes are enabled in Settings in your device.

from mzdownloadmanager.

andrealufino avatar andrealufino commented on May 25, 2024

Everything is set on device. Basically my code add a download task every time a new one is finished, so I don't load all my 500 tasks once, but one per time. I don't know if this information can help you.

from mzdownloadmanager.

sivanookala1979 avatar sivanookala1979 commented on May 25, 2024

how to see the files in custom directory in my iphone.

from mzdownloadmanager.

mohammadzk avatar mohammadzk commented on May 25, 2024

hi is there a way to resume downloads after force quitting the app and opening it again

from mzdownloadmanager.

mzeeshanid avatar mzeeshanid commented on May 25, 2024

When user force quits app and relaunch the app this delegate method got called func URLSession(_ session: Foundation.URLSession, task: URLSessionTask, didCompleteWithError error: NSError?) and in error's info there is a key i.e NSURLErrorBackgroundTaskCancelledReasonKey and in this case its value will be NSURLErrorCancelledReasonUserForceQuitApplication. There are additional keys in that user info try to find out the resume data from the error and restart the task with the resume data.

from mzdownloadmanager.

mohammadzk avatar mohammadzk commented on May 25, 2024

ok thank you very much for wonderful library 👍

from mzdownloadmanager.

NorbertSzydlowski avatar NorbertSzydlowski commented on May 25, 2024

+1 I have issue with background download (unknown error).

I am running app from xcode in my device, background is working. I will open second app and go back again to main app, download work.

I launch app from icon (after installed) and make the same steps as above, error trigger.

Any idea?

from mzdownloadmanager.

ugochirico avatar ugochirico commented on May 25, 2024

Hi, I'm trying to implement a way to resume a download task after the app has been quit by the user
because I need to download a large file (300MB more or less).

can you share a code snippet that shows how to do that?

from mzdownloadmanager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.