I am creating an application wherein I am downloading some data from server. While going in background I want that connection should continue running so that data can be downloa
I don't know how you handle your data downloading exactly. But you can take a look at ASIHTTPRequest. It is very simple and straightforward, and works with ARC if you set the compiler flags to -fno-objc-arc. With this you only have to use
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request setShouldContinueWhenAppEntersBackground:YES]; //For iOS 4.0 and up
And that works.
Here you can see how ASIHTTPRequest works
Hope it helps!