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

sujithkrishnan

macrumors 6502
Original poster
May 9, 2008
265
0
Bangalore
Hi all...

I am looking to create a thread application, which will go on running through out. Also i want to make the thread to start as soon as the phone starts...
The thing is that how to check the current time inside a thread to trigger a operation

Actually my thread is one which download a xml file at every 24hrs.. say everyday 01.00 am....

Is NSThread is enough to satisfy my needs??

But how to make the thread active when IPHONE restarts...

please help....
 
Hi..
i heard that "its possible, but those sdk APIs are buggy....."

Is there any way, even though its not the proper way....

Only if you jailbreak your phone, which is the only way to run non-Apple background applications.

Using the SDK what you describe is specifically forbidden by Apple.
 
wait a little...
in september apple will release some mechnism to send notifications to apps so they can be "awaken" at will
for now i would advise you to just load the xml file on startup or maybe check if it is still valid (in your case the last midnight update...) and invest your time consolidating the rest of the application

:)
 
wait a little...
in september apple will release some mechnism to send notifications to apps so they can be "awaken" at will
for now i would advise you to just load the xml file on startup or maybe check if it is still valid (in your case the last midnight update...) and invest your time consolidating the rest of the application

:)

Not quite true. You can send an alert to ask the user if they want to launch the app. But there's no way to know that they've just turned their phone on to send the notification.
 
i was talking about application startup

maybe i did not fully understand what you´re trying todo

usually for the user any data will only be relevant after application launch so it can be updated at that time

the info on the upcoming notifications scheme has been around since wwdc, even today or yesterday there are news aaround bout it on the new 2.1 sdk preview
 
wait a little...
in september apple will release some mechnism to send notifications to apps so they can be "awaken" at will
for now i would advise you to just load the xml file on startup or maybe check if it is still valid (in your case the last midnight update...) and invest your time consolidating the rest of the application

:)

The notification service does not awaken apps or cause them to do any processing. All it does is alert you to the fact that you might want to run a particular app.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.