C# Push sharp call back成功,但未收到通知?

C# Push sharp call back成功,但未收到通知?,c#,pushsharp,C#,Pushsharp,我正在使用push sharp库向IOS设备发送通知 我正在使用这个类PushNotificationService 我已注册从APN接收回拨后将触发的事件 pushBroker.OnNotificationSent += OnNotificationSent; pushBroker.OnNotificationFailed += OnNotificationFailed; // Note for apple a notif

我正在使用push sharp库向IOS设备发送通知

我正在使用这个类PushNotificationService

我已注册从APN接收回拨后将触发的事件

            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; 
发送通知时,将触发此事件(OnNotificationSent)

我正在记录来自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; 
我重申这一回应:

成功设备ID

但是,通知尚未到达我的设备


有什么原因吗?

您应该在c#中使用此服务器端库进行推送通知:
使用它所描述的步骤包括需要引用从firebase控制台下载的serviceAccountKey.json文件。这是在通道上启用身份验证的文件。如果不启用此功能,则通知发送不可靠。

您使用的是哪个版本的PushSharp?@GuyMontag version PushSharp 2.2.1So
pushBroker\u onNotificationSuccessed
,但您的设备未收到任何消息?是否所有通知都会发生这种情况,也就是在您启动代理之后?我曾经遇到过这样一个错误,在我的例子中,它是到代理的连接丢失。它发生在连接初始化后约30分钟。实际上,我正在向50000台IOS设备发送数据,。但我有一个计时器,每10秒执行一次。此计时器将对一批300个设备进行排队。在前300批中。我有一个连接错误。而其余的则会引发成功事件,并表示已发送通知,但是对于部分成功设备。未到达通知。@user123456我也有同样的问题。我还将我的
PushSharp
更新为最新版本。有人找到了答案吗?