i want to run my timer in background even when app is not running.because i want to get gps cordinate of the user after some time interval.waht is the method to do this?
I don't think this is allowed in the iPhone programming paradigm. The operating system is capable of running background tasks but ordinary iPhone apps are not permitted to launch anything like this.
Not possible without jailbreak - iphone sdk apps can only run while on screen.
You could contact the people who made this
http://appadvice.com/appnn/2008/10/run-iphone-apps-in-the-background/
It only works on jail broke phones, another way it to use push notification from our servers for timed tasks. Why dont you use this, to wake up the app get the GPS then send it back to sleep. Better for batteries too.
The Apple Push Notification service is not, in fact, only available to a few developers. It is currently in wide-spread use.
Take a look at this:
The "Registering for remote notifications" section specifies how to register for push notifications. The other end is set up in the iPhone developer portal.
You might want to consider searching past questions before asking yours...
- http://stackoverflow.com/questions/491381/iphone-app-in-the-background
- http://stackoverflow.com/questions/1413154/how-to-implement-daemon-process-for-background-task-in-iphone-sdk-3-0
- http://stackoverflow.com/questions/1467313/iphone-app-generate-alert-popups-when-app-is-closed
- http://stackoverflow.com/questions/397846/is-there-any-system-level-background-queue-process-in-iphone
- http://stackoverflow.com/questions/1381387/push-notification-background-process-iphone
Those were all on the first page of results for iPhone + background + app. Please do some research first before posting your questions. Also, read this: http://catb.org/~esr/faqs/smart-questions.html