• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Out of process download support
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Out of process download support


  • Subject: Out of process download support
  • From: Scott Hancher <email@hidden>
  • Date: Thu, 20 Feb 2014 15:20:56 -0800

I'm currently working on support for this, but I can't seem to figure out how to test it.

It seems to work fine with my application in the background, and although I can't seem to automate a test for this, I can acceptance test it.

However, if my app is quit, then I don't seem to get a call to application:handleEventsForBackgroundURLSession:completionHandler: within a relaunched instance of my app nor is the file I've requested to download actually downloaded. I'm quitting my app via exit(EXIT_SUCCESS), which I suspect isn't ideal, but there doesn't seem to be another mechanism for killing it. I have tried to manually swipe the application up to remove it from the list of running apps on double tapping home, but this doesn't work either.

Do you have any suggestions on how I might be able to test this?

Some snippets of my code:

NSURL *url = "">NSURLRequest *request =
  [NSURLRequest requestWithURL:url
                                     cachePolicy:NSURLRequestReloadIgnoringCacheData
                                 timeoutInterval:60];
NSString *identifier =
  [NSString stringWithFormat:@"SessionId_%@", [[NSUUID UUID] UUIDString]];
NSURLSessionConfiguration *config =
  [NSURLSessionConfiguration backgroundSessionConfiguration:identifier];
NSURLSession *session =
  [NSURLSession sessionWithConfiguration:config
                                                        delegate:self
                                             delegateQueue:[NSOperationQueue mainQueue]];
NSURLSessionTask *sessionTask = [session downloadTaskWithRequest:request];
[sessionTask resume];

Thank you,
Scott.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Out of process download support
      • From: Fritz Anderson <email@hidden>
  • Prev by Date: Re: Testing resumeData from cancelByProducingResumeData:
  • Next by Date: Re: Out of process download support
  • Previous by thread: Re: Testing resumeData from cancelByProducingResumeData:
  • Next by thread: Re: Out of process download support
  • Index(es):
    • Date
    • Thread