Group Group Group Group Group Group Group Group Group Forums

Video Tutorial: Networking With NSURLSession Part 1: NSURLSession And Configuration

Learn about NSURLSession and how to configure it.

This is a companion discussion topic for the original entry at

I could have messed up, but it seems like the starter and completed playgrounds are the same file for this video?

It’s not you, looks like the starter playground is not as it should be. Thanks for pointing it out!

Is the task variable a closure in this case?

No, the task variable is the result of the dataTaskWithURL call, which is an NSURLSessionDataTask (or URLSessionDataTask in swift 3). It uses the version of dataTaskWithURL that executes a closure parameter when the data task is done. I hope that’s helpful.

Why are the materials not updated to the newest version i.e. Swift 3, Xcode 8 and iOS 10?

You’ll be happy to know this series will be updated soon. Please stand by…

1 Like

Is there a network library similar to NSURLSession and the other classes in Open Source Swift Core Libraries?

I’m not sure what’s in the core libraries, but NSURLSession is URLSession in Swift - look for that.