Scratching the surface of NSURLSession
NSURLSession is the replacement of NURLConnection, which resolves the issues occurring with the latter. Session objects are created with the class methods which takes the configuration object. There are 3 types of possible sessions: Default Ephemeral, in-process session Background session NSURLSessionConfiguration *sessionConfig = [NSURLSessionConfiguration defaultSessionConfiguration]; The above configuration object has properties which controls the way it behaves, for instance, whether the cookies are allowed, timeouts etc. And also few more properties like : * allowsCellularAccess : Could be set to say the operating system whether the device is permitted to run the networking session when the cellular network is available. * discretionary : Could be set to say the operating system to run the networking session when the device is connected to Wifi or has good power. After creating the session configuration object, we can create the session object...