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..
Related
In ios simulator, I cant able to view the notification is there any setting on a simulator to get the notification in notification bar.i am using the hybrid app.
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.
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
I send push notification on iOS devices, but when the screen is locked, it just get brighter, but doesn't show always the push notification
I cannot figure out the pattern
Push notification is OK, and shows sometimes on one device, but not on the others (the other devices bright up the screen)
Setting are OK, different 4 iOS iPad devices
Notifications are correctly delivered to Apple
UPDATE
Note: this random behaviour only seems to happen when the Badge number is 0 and send as 0 (doesn't happen when badge number is not part of the push, or > 0)
Is this expected behaviour?
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.