Push notifications pop up

Hi


I'm am making an app that uses both local and external (not sure what is the correct term) push notifications.


The notifications only appear on the notifications drawer (and doesn't even make a sound if the app is currently running on the foreground), which makes them pretty unnoticeable for the user.


How can I customize a push notification layout? Can I get it as a pop-up instead of in the Notification Bar? (similar to how a new message pops on the screen when received).


Please tell me what shell I do.


Thanks ahead for your attention and time.


Yair

Remote notification.


No I think the appearance of the notification (banner vs. alert) is up to the user, not under the app's control.


If your app is running in the foreground when the notification comes in, the app delegate should get a call to the application:didReceiveRemoteNotification: method. You just need to implement that delegate method and play whatever sound you want / update your UI. In that case (and only that case) you can determine how the notification is displayed. If your app is not running, then the user's preference is followed. (There's another delegate method application:didReceiveRemoteNotification:fetchCompletionHandler: which is also called if your app is running but in the background. You *may* be able to play a sound in that case; not sure about that. But I'm pretty sure you don't get to choose the notification UI.)


Make sure you read the UIApplicationDelegate protocol reference and the Local & Remote Notifications Programming Guide thoroughly. There are a lot of details.

Push notifications pop up
 
 
Q