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 protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to