Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Hi,

Can please somebody help me, how can I make my application to run in background?
For eg. My application continuously ping server to get and send some data on the basis of user's setting. Currently when I run my application it works perfectly.I used NSTimer to perform that task repeatedly after specific time, set by user. Now if I stop the application the whole process stops, but I need is that, even after user stops the application it should not terminate. The task that is performed by NSTimer repeatedly must go on as it is. Means I just want to run my application in background, ever if user stops it or any interruption occurs, application should not terminate.

thanks

Get an app called dockless. If you download that as well and select that app to run in the background it will do it for you
 
Background tasks

Sorry dude,

But this is a limit of the platform.

You cannot create a task that runs in the background.

At least not legally and make it on to the app store.

Apple made this decision for a variety of reasons, primarily because it would impact performance and security of the device. For example, we have an app that needed to do it, our Windows Mobile guy figured out how to do it and the client was very happy with him, and not so happy with me. Until the client actually tried to use the WinMo app and found out the device only had a 2 hour battery life with the background task turned on. I ultimately found another way of accomplishing my objective, but the task ended up running on the server.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.