NSURLSession vs NSURLConnection by Santiapps.com Marcio Valenzuela

Fetching data from an iOS app – The new NSURLSession API

Ok, this is gonna be short, I promise! ๐Ÿ™‚ Do you remember those apps you’ve got stored away or the ones you are working on that fetch data from the web with a NSURLConnection? Time to update them, here’s how. Basically you have a method that calls a web fetch and is somehow signaled to use that received data to refresh a UI. If you used NSURLConnection sendAsynchronousRequest:, you have the issue that it blocks the main thread. It does carry out requests asynchronously from each other, but each request does indeed block the main thread since it is carried out in the main queue. Alternatively, you can use a… Read More

Continue Reading