I have been using removeDeliveredNotificationsWithIdentifiers: and removePendingNotificationRequestsWithIdentifiers methods to remove local notification from the notification centre.
It has been working perfectly until I updated my device to iOS 11.2.2, Notification remain in the notification centre. If I run getDeliveredNotificationsWithCompletionHandler, it returns an empty array.
After executing removal command from the code, if remove one notification of the app from the tray, rest of the notifications of the same app get removed as well.
Each notification has a different identifier.
I have another device which has 11.1, notifications are being removed perfectly on this device.
Related
I'm having weird experience.
Why push notification is shown (in native banner) when app is foreground?
It's only reproduced on iPhone 7 (iOS10.1.1).
I tested on the other iPhones like a iPhone 5 and iPhone 6s with same app, same iOS version.
It's not shown when app is in foreground as normal.
Push banner appears only on iPhone 7.
Is this normal?
My app is created by Xamarin.forms. (For now, Xamarin convert c# code to objective C, so it's basically objective c)
Thanks.
Starting with iOS 10 developers can control how notifications are shown when the app is in focus. This is done by setting up a UNUserNotificationCenterDelegate.
The userNotificationCenter:willPresentNotification:withCompletionHandler: will be fired on this delegate where UNNotificationPresentationOptions can be passed to the completionHandler to determine if the notification should be displayed along with its sound and badge value update.
Based on your question it sounds like you are using a SDK or framework to add notifications. You can still use a UNUserNotificationCenterDelegate along with most notification SDKs.
Note that on iOS 9 and older devices this delegate isn't available and notifications will not show in the notification center when they are received while your app is in focus. Instead you must must still use UIApplicationDelegate for older versions of iOS and show an in app message for them.
If an application is upgraded to iOS10, and developers of their app have used the UserNotifications framework.Then there are functions by which notification can be displayed as a native banner when app is in foreground.
The UNNotificationPresentationOptions flags allow you to specify UNNotificationPresentationOptionAlert to display an alert using the text provided by the notification.
It effect will same if you are using iOS10 , and app is compatible with UserNotifications framework.
As you mentioned, you have tested the app with Other device with same version, Then might be their app's latest version is not installed on those devices.
It is not based on iPhone7 only. That will work when iOS10 is
installed in your device and application is using UserNotifications
framework for handling the notification.
I am having a problem letting the OS show the default push notification banner while the app is running but behind the lockscreen.
Test Case:
Open the app.
Press on the power button.
Send a push notification from the server.
Current Behaviour:
The phone's screen just turns on.
No notification banner appearing on the screen.
Expected Behaviour:
OS Notification banner to appear on the screen.
Tested on:
iOS 9 & 10
NB. Push notifications are sent, delivered & displayed otherwise than the above test case..
I use Parse to send push notifications to iOS devices. This works fine. But SOMETIMES (Here is the question mark) there is a weird behavior:
Send push notification to a device... I swipe/tap it on the device and everything is ok. It is no longer visible on the lock screen, but on the notification center (Pull down menu). Alright!
Send another push notification to this device while iPhone screen is off... Notification appears, but also the old notification appears again (Even when it is one day old) and both sounds are being played almost simultaneously.
An Parse employee answered this question:
It's rare, but can happen when an app sends a lot of similar
notifications to the same device. It's a known problem on our side,
it's on our plate to get fixed.
See here: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!topic/parse-developers/Zo3xBRLWttc
So I just got a complaint from a user saying they were not receiving any notifications from my app. I asked them to go into the Settings app -> Notification Center and check to see if alerts from the app were toggled on. (Banners, Badge app icon, Sounds, Show in notification center, show in lock screen)
Surprisingly, he mentioned that the app wasn't even in the list of apps in the Notification Center. This is weird because on my device, and all devices I've tested with, the app is listed under Notification Center and notifications work fine. How could this possibly happen?
Also, keep in mind that my app only uses local notifications, not push notifications.
I have some issues on push notification on IOS6 and IOS7 in ipad. Previously in IOS6 push notifications were working fine. After updating to IOS7 it is not consistent. Sometimes i am getting notifications and sometimes not. I have a messaging ipad app. From server side it is all fine but I do not receive any notfication on iOS6 & IOS7.
Even for other apps like facebook also not getting notifications.
Thanks in advance.
Did you kill your app with the app switcher?
Since ios7 killed apps do not receive push notifications.
See my answer here: Silent push is not working when app is killed from app switcher in ios7