向iOS PushSharp证书发送推送通知

向iOS PushSharp证书发送推送通知,ios,ionic-framework,push-notification,certificate,pushsharp,Ios,Ionic Framework,Push Notification,Certificate,Pushsharp,我正在推送通知服务器中使用PushSharp 4.0.10 我可以向Android发送推送通知,但当我尝试向ios发送推送通知时,会发生错误: Something went wrong in Comunications Worker: Method name -> PushNotifications.DispatchPushNotifications() Message -> There is an error sending iOS push notifications. Exc

我正在推送通知服务器中使用PushSharp 4.0.10

我可以向Android发送推送通知,但当我尝试向ios发送推送通知时,会发生错误:

Something went wrong in Comunications Worker: 
Method name -> PushNotifications.DispatchPushNotifications()
Message -> There is an error sending iOS push notifications.
Exception - > Specified argument was out of the range of valid values.
Parameter name: You are using a certificate created for connecting only to the Sandbox APNS server but have selected a different server environment to connect to.
我已经创建了一个证书“苹果推送通知服务SSL(沙盒和生产)”,以及个人证书“iOS应用程序开发”和“应用商店和临时”。在这两种情况下,我得到相同的错误

是否有生成证书的正确方法

你能告诉我正确的方法吗,或者是否有其他错误或缺少更新


感谢您抽出时间。

创建ApnsConfiguration对象时会生成此错误消息(请参阅源代码:)

如果您检查此特定异常是如何引发的,您会注意到它基于证书的名称。创建ApnsConfiguration对象时,可以通过为validateIsApnsCertificate参数传入false来删除检查

这可能无法完全解决您的问题(如果证书有其他问题),但如果问题出在证书的名称上,那么这可能会有所帮助