Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8484983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:31:13+00:00 2026-06-10T20:31:13+00:00

If I have a large file download going on an the app gets moved

  • 0

If I have a large file download going on an the app gets moved to background, is there any way to keep the download executing functions alive?

I knowbeginBackgroundTaskWithExpirationHandler: gets called when the app moves to the background and I can start my task there, but I don’t want to start a new task, I want to complete my old task. It can be solved with beginBackgroundTaskWithExpirationHandler:, but for that I need to pause my download and resume it from the right place, which is just plain silly.

Ideally what I want is that I wrap my download function with an expiration handler, so my download function keeps executing for the permitted time after the app has been moved to the background.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T20:31:14+00:00Added an answer on June 10, 2026 at 8:31 pm

    Ideally what I want is that I wrap my download function with an expiration handler, so my download function keeps executing for the permitted time after the app has been moved to the background.

    This is exactly how it works. beginBackgroundTaskWithExpirationHandler: is not called when you enter the background. It’s what you call to indicate that you’re starting something that, if you happen to go into the background while it’s running, you would like to finish. Just wrap your existing download code with beginBackgroundTaskWithExpirationHandler: and endBackgroundTask:.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a large file I want to download from a server I have
I have a large XML file (many MBs) that I cannot afford to download
I have to write a php script to download potentially large files. The file
I have a microcontroller that must download a large file from a PC serial
I am going to implement a function that will download a large file (about
I have to download an arbitrarily large file in base64 in a device with
I have been creating a new service to download large file to client. I
I have an app that downloads a very large file (over 50MB). Unfortunately I'm
I have to download a very large file on the iPad. (iOS5, iOS6) To
I have a large file where each line contains a substring such as ABC123.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.