How to control number of APN entries in the Notification Center - ios

Currently I have an application that receives remote APN. I know that you can cancel specific or all local notifications. However, is there any way to control how many entries in the Notification Center? (Notification Center being the pull-down menu)
Thank you!

The user can control the number of notifications that can show up in Notification Center for each app, in Settings/Notifications.
As a developer, the only way you can control the number of notifications that show up in Notification Center is by controlling the number of notifications you send.

Related

Questions about Local notifications in iOS

I'm working on a project on iOS 7, 8 that use a lot of notifications (Remote, Local). I have some questions about Local Notification.
I'm using Local Notification to schedule an alarm or a count-down. As I know, the use of NSTimer is not really a good choice since it has only up to 10' in background & if the app process is killed it doesn't work anymore. Local Notification is managed by iOS but I have to accept its alert when the app is not in foreground. There's nothing like silent local notification (local notification without alert, sound or badge and app still knows about it although it's in background). Am I right ?
Let's assume that there're some simple local notifications in Notification Center, scheduled by our app. Normally when I touch on a notification to see it in my app, the others remain present until we interact with them. In some cases that I haven't figured out, all other notifications are removed from the Notification Center. Does anyone encounter this & understand why ?
I find the interactive notification feature in iOS very limited. I want to change the title of a defined UIMutableUserNotificationAction button & add an image for it, like I can do with UIButton. So the question is : Is it possible to customize the UI of an action button ?
Thanks for your help !
Unfortunately there is no correspondence in silent notification using local notifications.
The number of the visible notification in the notification center is a user decision, the user in Settings can decide to set a different number or decide to do not show them in notification center as well. As for the first point no. The third point is not clear, you can set the image you want for a remote just put in the payload the right name, local notifications use the app icon.
There is no silent notification for Local Notification. The user has to click to the notification to open your App.
I suppose that the associated application has deleted those notifications programmatically. Else, those notifications must stay in the notification center.
You cannot add image to action buttons but just the titles.
I tried more than two weeks to do the same. I had to show notification after 2 hrs even if the use doesn't click the notification. But the repetition facility is well handled in objective C. I could have created multiple local notification but it will also violates the total number of 64 notifications. Apple needs to improved the same.

Change State when User Selects Notification from iOS Notification Center in Cordova

I'm attempting to open an iOS/Ionic/Cordova app at a specific message/state (given an ID), when a user clicks on a message push notification in the notification center. Is there a way to tell, using Cordova, if the app has been opened through the notification center?
From the docs, the callback is the point of entry for your notification. Any calls you make (or variables you set) inside the callback will only be possible if the app has been opened through the notification center

IOS push notification delete

I use a phone gap plugin and xcode 5.
Lets see the example of the problem:
The application is in background or closed.
I send the notification.
User sees the notification pop up, without clicking on it.
I send another notification.
If user open notification bar it will see two notification actually i want
to delete the previous some how and present to user only the second notification.
The eqvivalent in java is NotificationManage.cancelAll();
For now each/all notification i send are shown when user open notifications bar.
Any help appreciated.
You have (the app has) no control over that.
The user controls how many notifications they see in notification center. Notifications can be removed by the user and will be removed when acted upon (the app is opened from the notification).
You can do this by [UIApplication sharedApplication].applicationIconBadgeNumber = 0;
in the method didReceiveRemoteNotification. In this way notification center will be cleared.

Can a push notification skip the notification center?

Is it possible to send a push notification to my users without entering the notification center? I want to display a popup that will die after confirm or cancel.
I know it was possible in ios 4 and was replaced by the Notification Center but I have to ask to be sure.
There is no way for you as a developer. This can be set in Settings for each application:

Is it possible to remove an application icon badge yet for notifications to remain in the notification center?

My app is queuing local notifications (and can also receive APNs) and the app's icon badge is getting set as a consequence.
When the app launches I want to clear the icon badge but I want the notifications to remain in the notification center history lists. But it seems this isn't possible? Setting the badge count to 0 has the effect of removing all notifications from the notification center.
Is there any way I can leave them there so it is the user's responsibility to remove them, yet at the same time clear the app's badge?
No, unless something has recently changed, the notifications in Notification Center are tied to the applications icon badge.
This code reads like it should clear only the badge, however, it is commonly used to clear the notifications in Notification Center:
[UIApplication sharedApplication].applicationIconBadgeNumber = 0;
However, when the code is used, the Notification Center notifications are cleared as well. Notification Center reads what to display based on what is displayed on the icon.
Sources:
My own experience
This previous question

Resources