OS X 10.10.5
Trying to download a file with:

session = [ NSURLSession        sessionWithConfiguration:       
defaultSessionConfiguration
                                                delegate:                       
                self
                                                delegateQueue:                  
nil                     
                ];
dataTask = [ self.session dataTaskWithRequest: request ];
[ dataTask resume ];

The problem:
NSURLSessionDelegate and NSURLSessionTaskDelegate methods get called (as 
expected) but none of the NSURLSessionDownloadDelegate methods ever get called.

And these are the only ones (namely …didFinishDownloadingToURL:(NSURL 
*)location) which would tell me, where my file did end up.

URLSession:task:didCompleteWithError:
tells me that all went well: 
<__NSCFLocalDataTask: 0x107d00de0>{ taskIdentifier: 1 } { completed }

What am I doing wrong?

5 seconds after senden this I noticed that I should use downloadTaskWithRequest 
instead of dataTaskWithRequest.
Silly mistake.
Sorry for the noise.

Gerriet.



_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to