Since 03/12/1017 Not received notifications from azure notification hub - azure-notificationhub

On sending test message (WNS) received back message:-
The Notification was received and dropped by the Push Notification Service as device in disconnected state
Everything has been fine for the last 2 years with no changes.

I see a lot of X-WNS-DEVICECONNECTIONSTATUS-disconnected error messages shown in the logs for your namespace. This happens when the device is offline and not connected to WNS. Can you check if that is the case with you.

Related

Push notification data when app is not running?

When the app is not running and user receives, say 5 push notifications, are those push notifications saved somewhere? Or is that data gone? I need to access all 5 push notifications when the app runs the next time.
To clarify, I already understand that you can access the push notification that caused the app to run. What I'm asking is to get all push notifications since the app got terminated.
The APNS service will only retain the most recent pushed message to a device - assuming there is still at least one other app installed AND the user allows push notifications for it, then this one stored message will be delivered the next time the user has an Internet connection.
For better information on the quality of service that Apple has implemented for the APNS service, see my other answer here:
Clarification on Apple APNS

iPhone: Push notification reliability on bulk devices

I have been using https://github.com/Redth/APNS-Sharp to send push notification message to all devices where my iPhone App installed. It's working very inconsistent way!
How does this issue started?
We have an iPhone App with around 500 users. We noticed that most of users are not receiving notification message! Further debugging on real time, I have noticed following sequence of events.
.....
10:37:33 AM - Notification Queued!
10:37:33 AM - Notification Queued!
10:37:33 AM - Notification Queued!
10:37:33 AM - Notification Queued!
10:37:36 - Connecting...
10:37:36 - Connected...
10:37:36 - Notification Success
10:37:36 - Notification Success
10:37:36 - Notification Success
...
10:37:36 - Error: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.
10:37:39 - Connecting...
10:37:40 - Connected...
10:37:40 - Notification Success
10:37:40 - Notification Success
....
What I have done?
I have created testing iPhone App using Ad-Hoc production certificate and installed it on 5 devices. I tried sending multiple messages at the same time to all these devices. I noticed totally inconsistent behaviour in receiving messages. Sometimes all 5 devices received message instantly. Out of 5, 3 devices receive message almost instantly, and out of other two devices, either of them receive message instantly sometimes and other doesn't receive all messages but the last message. Sometimes it doesn't receive message at all!
I also tried sending message to individual device at a time and noticed that once it has started receiving the message then all message comes instantly and sometimes just receive last message after long duration(about 20 minutes).
What I have verified?
It uses the same connection to send all messages so it doesn't open multiple connections.
Using the correct certificate and push notification server.
Ran Feedback service few times but it didn't return any device IDs.
Does anyone else noticed this behaviour? What could be issue when you send message to multiple devices? Is there anything else I could do to make Push notification reliable?
Thanks.
Try UrbanAirship. I have found it to be very consistent because of its cloud approach (having deployed several apps). A lot of major players are using it too (tapulous etc.). Its always better to delegate the headache of such things to the experts :). + Its free.
I have logged this bug to Apple and got response from them. It seems they have fixed client side things related to Push Notifications in iOS 5.0. Also as Push Notification is not guaranteed, this inconsistent behavior has been happening. If someone interested then Bug ID# 10333505

Not all iPHone push notifications delivered to iPhone

I am developing iPhone application, application registered for receive push notifications.
I send push notification to gateway.sandbox.push.apple.com from server,all ok, but sometimes push notifications not delivered to iPhone (size of notification message is correct, < 256 bytes). Why? Maybe exists limitations for iPhone sandbox(for example count notifications in one hour) ?
There is no guarantee of delivery of push notifications. In addition to other potential causes consider this section of the Local and Push Notification Programming Guide
Quality of Service
Apple Push Notification Service includes a default Quality of Service
(QoS) component that performs a store-and-forward function. If APNs
attempts to deliver a notification but the device is offline, the QoS
stores the notification. It retains only one notification per
application on a device: the last notification received from a
provider for that application. When the offline device later
reconnects, the QoS forwards the stored notification to the device.
The QoS retains a notification for a limited period before deleting
it.
If a device is offline (either turned off or just unreachable) then it will receive at most a single push notification you attempt to send to your application during that time.
Sometimes the fault is on your network provider which is unable to deliver notifications.same problem i was facing with my device when it was connected to wifi, When I connected it to 3g network all notifications were received instantly.

Apple push notification service, when device is off line

My push notification service in sandbox development phase works well when the device is online. It keeps getting push messages.
However if a message is sent from te provider (server) when the device is offline (no 3g or wifi), the device is not receiving the push message when it gets online.
Any thoughts on this?
UPDATE New rephrased documentation is here
Thanks AL
After going through Apple's Quality of Service https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html
It retains only one notification per application on a device:
Apple Push Notification Service includes a default Quality of Service (QoS) component that performs a store-and-forward function. If APNs attempts to deliver a notification but the device is offline, the QoS stores the notification. It retains only one notification per application on a device: the last notification received from a provider for that application. When the offline device later reconnects, the QoS forwards the stored notification to the device. The QoS retains a notification for a limited period before deleting it.

Is Apple's push notification service reliable?

I have an iOS app using push notification but once in a while I'm not getting a notification on my device when I expect to receive one. I would receive all the subsequent notifications. I confirmed with my backend to make sure that all the notifications were sent successfully.
So my question is: is APNs nearly 100% reliable or should I just expect to miss some notifications here and there because of intermittent 3G/wifi connection?
I would think that APNs works as a queueing system and retry if it wasn't successful within the first few times.
The APN service will queue messages up -- but Apple doesn't guarantee delivery of all messages. Only the last message from an application will be kept in the queue when the user is offline. Additionally, old messages may be deleted.
Local and Push Notification Programming Guide
Apple Push Notification Service
includes a default Quality of Service
(QoS) component that performs a
store-and-forward function. If APNs
attempts to deliver a notification but
the device is offline, the QoS stores
the notification. It retains only one
notification per application on a
device: the last notification received
from a provider for that application.
When the offline device later
reconnects, the QoS forwards the
stored notification to the device. The
QoS retains a notification for a
limited period before deleting it.
I have an azure website (and mobile service, service bus, db, active directory etc) that sends push notifications to a xamarin app on a windows phone and an iphone. The first notification is received by both. The second notification is only received by the windows phone, it doesnt make it to the iphone. If I send another notification, it is received by both. So I investigated the behaviour at bit more and found that if I machine gun a series of notifications (hand typed one per 2 seconds) the windows phone received them all but the iphone only receives the first one. But if I wait a while and send a notification it is received by both devices. The next test is to see if the notifications are always received with a 5 minute gap. Sent two messages with a five minutes gap in between, both windows phone and iphone received both notifications.