Push notification 使用c语言中的jdsoftnotification向苹果推送通知#过去两天不工作

Push notification 使用c语言中的jdsoftnotification向苹果推送通知#过去两天不工作,push-notification,Push Notification,私有NotificationService配置NotificationService(布尔沙箱、字符串P12文件、字符串P12文件密码) { //实际代码如下所示: //-------------------------------- string p12Filename = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, p12File); NotificationService se

私有NotificationService配置NotificationService(布尔沙箱、字符串P12文件、字符串P12文件密码) { //实际代码如下所示: //--------------------------------

        string p12Filename = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, p12File);

        NotificationService service = new NotificationService(sandbox, p12Filename, p12FilePassword, 1);

        service.SendRetries = 5; //5 retries before generating notificationfailed event
        service.ReconnectDelay = 60000; //5 seconds

        service.Error += new NotificationService.OnError(service_Error);
        service.NotificationTooLong += new NotificationService.OnNotificationTooLong(service_NotificationTooLong);

        service.BadDeviceToken += new NotificationService.OnBadDeviceToken(service_BadDeviceToken);
        service.NotificationFailed += new NotificationService.OnNotificationFailed(service_NotificationFailed);
        service.NotificationSuccess += new NotificationService.OnNotificationSuccess(service_NotificationSuccess);
        service.Connecting += new NotificationService.OnConnecting(service_Connecting);
        service.Connected += new NotificationService.OnConnected(service_Connected);
        service.Disconnected += new NotificationService.OnDisconnected(service_Disconnected);
        return service;
    }
alertNotification.Payload.Alert.Body=string.Format(“{0}{1}向您发送了一个好友请求”,“测试”,“测试”); //alertNotification.Payload.Badge=totalCount; alertNotification.Payload.AddCustom(“SourceType”、“FriendRequest$”+obj.ContentId)

服务队列通知(alertNotification)

上面是我的代码中的一些代码,直到上周我还可以正常工作,现在当我尝试这项功能时,它没有向设备发送通知。最后它点击了服务错误方法返回的错误是 “从传输流接收到意外的EOF或0字节。”。 尝试了2到3个沙盒证书,但它给出了相同的错误
请帮助。

我的问题通过更改OpenSslStream解决:

apnsStream.authenticatesClient(this.Host,this.certificates,System.Security.Authentication.SslProtocols.Ssl3,false)


apnsStream.authenticatesClient(this.Host,this.certificates,System.Security.Authentication.SslProtocols.Default,false)

我有完全相同的问题。Push适用于生产证书,但开发者证书也有相同的例外。它大约在6天前开始,还没有完善。您应该何时更改它?我的代码中没有看到“apnsStream”。上面的代码是针对APNS Sharp 1.0.4.4版本的。如果您使用的是PushSharp更新版本,您可以找到
stream.authenticatesClient(this.appleSettings.Host,this.certificates,System.Security.Authentication.SslProtocols.Tls,false);
在applepushconnel.cs中