Getting Started with NSURLSession

Ken Toh,iosswifttutorial

Whether an app retrieves application data from a server, updates your social media status or downloads remote files to disk, it’s the HTTP network requests living at the heart of mobile applications that make all that magic happen.

While there are a number of third party iOS networking libraries out that such as AFNetworking and Alamofire that can help simplify the technicalities of achieving these tasks, Apple has actually made nearly as easy to do the same via its own built-in NSURLSession.

Earlier this year, I wrote a “Getting Started” tutorial on RayWenderlich (when I was still part of the team) explaining how you could leverage NSURLSession to do things like creating HTTP requests and implementing file downloads. If you’d like to learn more, do hop over to the blog post and check it out.

© Ken TohRSS