Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IOS 5 Local Notifications While in Foreground, is there a way

On IOS 5, we now have the notification bar on top to put messages. I have seen that Local Notifications will only happen if the app is in the background (not sure when queued, and / or when the notification is to fire, assume the latter).

Is there any way to put notifications in the notification bar while the app is in the foreground?

like image 376
ort11 Avatar asked Jan 18 '23 03:01

ort11


1 Answers

From my understanding, your app will be notified of a local notification while the app is running in the application:didReceiveLocalNotification delegate method, but a banner will not be shown at the top of the device screen, not will an entry be put in Notification Center. Your app is notified however, and this is so you can show your own UI for the notification in the app, or choose to ignore it.

Notification Center is only for notifications that you're missed because the app is not in the foreground, and that's why they disappear when the app is opened.

like image 188
W Dyson Avatar answered Mar 31 '23 17:03

W Dyson