Tag Archives: NSURLConnection

Advantages of NSURLSession over NSURLConnection in iOS and Sample Demo Code

By | March 30, 2016

In an application we usually works with Data tasks – Data tasks are used for requesting data from a server, such as JSON data. These data are usually stored in memory and never touches the File System We can use NSURLSessionDataTask. Upload Tasks – Upload tasks are used to upload data to a remote destination.… Read More »

NSURLConnection – A Simple example – Upload image to server using POST method.

By | November 13, 2014

Make sure you setup the server and have gone through this post before reading this article. You can read more about NSURLConnection Class from here. https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSURLConnection_Class/index.html#//apple_ref/occ/instm/NSURLConnection/ Here In this article I am going to select an image from the gallery and upload to a server using 1. Synchronous method 2. Asynchronous method – different ways.… Read More »

Send Data to server in iOS using POST OR GET – A Simple Example

By | November 9, 2014

First Make sure you have this kind of layout and you have linked all the views to their respective variables. For server side I am using XAMPP for Localhost for now and My php file will be residing in Applications ▸ XAMPP ▸ xamppfiles ▸ htdocs You can download “XAMPP For Mac” from this link.… Read More »