tags:

views:

780

answers:

4

On the iPhone, when your phone is locked and screen off, if a SMS message comes in, the screen turns on and an alert shows up.

Currently I am using UIAlertView to create the alert dialog (with 2 buttons). If the phone is off/locked, nothing shows up until I turn it back on and unlock it. Is there any way to simulate the 'SMS preview' behavior, possibly with another class, and hopefully still allow the user to interact with the buttons there?

+2  A: 

CFUserNotificationCreate is your friend.

Not in the official iPhone SDK? Too bad, I remember that a year ago on the big presentation of the yet-to-come SDK, an Apple evangelist/chief saying that the SDK would include exactly the same API as used internally by Apple... Pfff...

/John

John Lane
+2  A: 

What you want to do is not currently supported by the SDK. You should file a request with Apple.

August
A: 

Did you get a solution to this? I am looking for something similar. I m trying to Display CFUserNotificationDisplayAlert on iPhone Lock Screen

raziiq
Nope. Still not possible, I'm afraid. Only apple can pop notifications on the home screen.. except for push notifications, I guess.
justinb
Means even CFUserNotificationDisplayAlert cannot be displayed on lock screen? BTW i am on a Jailbroken iPhone
raziiq
A: 

I'm looking for the answer too, buy I thinks it exist because you can visit this app from apple in wich they use it http://www.apple.com/mobileme/features/find-my-iphone.html

mapega