• 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
Get a NIL NSError object for second download task
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Get a NIL NSError object for second download task


  • Subject: Get a NIL NSError object for second download task
  • From: Daryle Walker <email@hidden>
  • Date: Tue, 07 Apr 2015 15:10:00 -0400

I’m using NSURLSessionDownloadTask in a command-line tool. I just adapted it to run multiple URLs to download. The loops and task work when I enter a single URL. When I enter two, the shorter file is downloaded, but the "- URLSession: task: didCompleteWithError:” is called for the second URL, and the error parameter gets NIL as its value. I have a run loop in the main function, and I call “resume” on both tasks. Am I supposed to run the success code when I get a NIL error? But there’s a separate method for successful downloads (and that other method tells me where the new file is)! The two URLs download when I call the tool for them separately.

I only have two delegate methods defined; the other is “- URLSession: downloadTask: didFinishDownloadingToURL:".

— 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com 

 _______________________________________________
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: Get a NIL NSError object for second download task
      • From: Daryle Walker <email@hidden>
  • Prev by Date: Re: How much time do I have to move a NSURLSession temporary file?
  • Next by Date: Re: Get a NIL NSError object for second download task
  • Previous by thread: Re: How much time do I have to move a NSURLSession temporary file?
  • Next by thread: Re: Get a NIL NSError object for second download task
  • Index(es):
    • Date
    • Thread