2

I am using push sharp library to send notification to IOS devices.

I am using this class PushNotificationService

I have registres the events that will fire after the call back is received from APNS.

            pushBroker.OnNotificationSent += OnNotificationSent;
            pushBroker.OnNotificationFailed += OnNotificationFailed;
            // Note for apple a notification is either successful or failed
            pushBroker.OnDeviceSubscriptionExpired += OnDeviceSubscriptionExpired;
            pushBroker.OnDeviceSubscriptionChanged += OnDeviceSubscriptionChanged;
            pushBroker.OnChannelException += OnChannelException;
            pushBroker.OnChannelCreated += OnChannelCreated;
            pushBroker.OnChannelDestroyed += OnChannelDestroyed;
            pushBroker.OnServiceException += OnServiceException; 

When I am sending the notification, this event (OnNotificationSent) is fired

I am logging the response from APNS.

I am reviving this response :

Succeed Device ID

However the notification has not reached my device ?

Any reason ?

user123456
  • 2,524
  • 7
  • 30
  • 57
  • What version of PushSharp are you using? – Florian-Rh Apr 04 '16 at 13:31
  • @GuyMontag Version PushSharp 2.2.1 – user123456 Apr 05 '16 at 10:29
  • You are almost two major versions behind the current one. Might I suggest updating to 4.0.4? The usage is slightly different yet not more difficult. Documentation is available here: https://github.com/Redth/PushSharp – Florian-Rh Apr 05 '16 at 11:37
  • I did upgrade to the latest version and I am still getting the same error. – user123456 Apr 07 '16 at 06:13
  • 1
    So `pushBroker_OnNotificationSucceeded` is called, but your device does not receive any messages? Does this happen for all notifications, also right after you started the broker? I encountered an error like this once and in my case it was connection loss to the proxy. It occured ~30mins after the connection was initialized – Florian-Rh Apr 07 '16 at 09:07
  • 1
    actually I am sending around to 50000 IOS devices,. But I am have a timer that executes every 10 seconds. This timer will queue a batch of 300 devices. In the first 300 batch. I get ConnectionError. While the rest the on succeeded events is raised and it said the notification has been sent, However for some part of the succeed devices. the notification is not reached. – user123456 Apr 07 '16 at 10:15
  • 2
    @user123456 I am having the same problem. I have also updated my `PushSharp` to the latest. Has anyone found an answer for this? – disasterkid Jun 21 '16 at 18:17

1 Answers1

0

You should use this server side library for push notification in c#: https://github.com/bytefish/FcmSharp The steps described to use it, includes a need to reference the serviceAccountKey.json file that is downloaded from the firebase console. This is the file that enables authentication on the channel. Without this enabling the notification sending is not reliable.

Mich
  • 56
  • 4