Top "Nsurlsession" questions

NSURLSession is the API for HTTP connections introduced in iOS 7 and OS X 10.

How does one deal with a cancelled NSURLSessionTask in the completion handler block?

If I create a NSURLSessionDownloadTask, and later cancel it before it finishes, the completion block still fires seemingly. let downloadTask = …

ios cocoa-touch swift nsurlsession nsurlsessiondownloadtask
Sending JSON POST request in Swift3

In my app i'm trying to make http post request with json data. The following json must be transferred to …

ios json swift nsurlsession
Domain=NSURLErrorDomain Code 1202

Hi I receive the following error: Error Domain=NSURLErrorDomain Code=-1202 \"The certificate for this server is invalid. You might …

ios amazon-web-services ssl nsurlsession tls1.2
NSURLErrorDomain Code=-1001 error when a http post request is sent

I am using the following code to post an image to my server. @IBAction func postButtonPressed(sender: UIButton) { let task = …

ios swift nsurlsession nsurlerrordomain
Set number of concurrent downloads with NSURLSessionDownloadTask

I'm using the new NSURLSession API and allowing the user to download files. I'd like to try and tell my …

ios ios7 nsurlsession
Swift: How do I return a value within an asynchronous urlsession function?

As you can see, I'm receiving a JSON file, parsing it using SwiftyJSON, and trying to return totalTime, but it …

json asynchronous swift nsurlsession
NSURLSession concurrent requests with Alamofire

I'm experiencing some strange behaviour with my test app. I've about 50 simultaneous GET requests that I send to the same …

swift concurrency nsurlsession alamofire nsurlsessionconfiguration
Download a file with NSURLSession in Swift

i have like 2 problems here , first i cant set NSURLSessionDownloadDelegate with a swift project, compiler says Type 'ViewController' does not …

ios swift nsurlsession nsurlsessiondownloadtask
iOS9 - HTTP Connection Error

I got 3 error when i update my Xcode 1- App Transport Security has blocked a cleartext HTTP (http://) resource load …

http nsurlsession
Best practices for making a queue of NSURLSessionTasks

What are the best practices for making a serial queue of NSURLSessionTasks ? In my case, I need to: Fetch a …

ios cocoa-touch nsurlsession