What happens when my application receives multiple push notifications?

I have doubts about APN. What happens if the application receives more than one notification if it is not already running. Will the OS show warnings one by one [If the user continues to close warnings] or will the application like this if the user "views" the action and clicks the user. If so, what about the rest of the warnings? If the application is running, it will provide a notification object that welcomes the application, or we can access all the notification notifications that are in the queue.

Help me find out what the process will be if the application (does not work) receives more than one notification? with options ("View" / "Close")

+4
source share
1 answer
  • If notifications are received in the same period of time with a delay of several milliseconds on the device, it will notify you of several alerts with your sound, and even you can see the pop-up window of all these alerts one by one and disappear but the one received last or last , will be displayed only for viewing the application or closing.

  • If the application is launched or launched by clicking the view button in the notification mode, in order to get information about the notifications viewed, you need to process it in the device itself. The default OS simply ignores all these warnings when the application starts. You should check if a warning is received at application startup.

This can be achieved using the UIApplication delegation method:

(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo 

it needs to be implemented. It receives a notification when the application is launched.

After you implement the above method, you will receive a pop-up warning about each notification, even if the application is running. And in this case, it does not start a new instance of the application. It will just show you a pop-up warning. Even if you click on the view, it’s useless. If you want a task to be performed after clicking on the view when the application is running, you can make this new functionality and say that the OS will behave as needed.

+2
source

All Articles