views:

596

answers:

3

How can I alert a user that they need to do something without using a push notification? For instance, if I have an alarm clock app, how can I get it to ring when it is not already running without using a push notification?

+6  A: 

You can't. As of writing, iPhone OS does not support background processes. (There wouldn't be any need for push notifications if iPhone OS supported background processes!) You can alert the user while your application is running using UIAlertView, but once your app is closed, you can't do anything.

As @Henrik P. Hessel mentions, it is rumoured that background processes will finally be supported in iPhone OS 4.0. Rumours also suggest that iPhone OS 4.0 will be previewed at the January 27 Apple Special Event. We'll soon see whether they're true...

Steve Harrison
+2  A: 

That's not possible yet. There're rumors though that multitasking and background processes will be allowed in iPhone OS 4.0. But that's more than speculative.

Henrik P. Hessel
A: 

You can't do it in the official iPhone OS 3.1.2 or lower. As mentioned by others, there are rumors that iPhone OS 4.0 will support background processes, but nothing about that has been confirmed by Apple.

You may, however, develop an application that can alert the user without push notifications if you forgo the officially sanctioned SDK + App Store route, and build applications for jailbreak (Cydia or Rock). There are a growing number of for-pay apps in jailbreak land these days. Of course, this will limit your app's exposure, and will be negatively looked at by Apple, but if you have a niche market (and don't mind requiring jailbreak users) or this is only for yourself/friends, this might be a good direction to go in.

Kevin Elliott
Or I can just use push notification... thanks though!
DevDevDev
But your question was how you can do it WITHOUT push notification.
Kevin Elliott