Tag: pushsharp

PushSharp为新创build的P12返回无效标记

我收到了一封来自苹果的电子邮件,说我的推送通知证书已过期,所以试图积极主动地重新生成证书,然后导出P12,但是现在当我使用新的P12而不是旧的时,PushSharp给了我一个“无效的令牌“错误。 如果那么我使用旧的P12,通知发送成功。 我现在试图撤销旧的证书,因为我的理论是,旧的证书仍然被应用程序用来生成设备的令牌,但旧的P12仍然有效,新的证书没有。 我必须等待旧证书在新证书工作之前完全过期吗? Push Sharp有什么其他原因可能引发“无效令牌”exception? 所有这些都是针对PushSharp的Production ApnsServerEnvironment设置的TestFlight(Adhoc)版本。

APN生产证书未被PushSharp识别

我开发了一个iOS应用程序,它接收推送通知。 我使用PushSharp从.NET环境发送它们。 在发展的过程中,一切都变得美好了,推送成功了: var push = new PushBroker(); var appleCert = File.ReadAllBytes(@"Utils\Cert.Development.p12"); push.RegisterAppleService(new ApplePushChannelSettings(false, appleCert, "*******")); push.QueueNotification(new AppleNotification() .ForDeviceToken(token) .WithContentAvailable(1) ); push.StopAllServices(); 现在,该应用程序已被批准,并在AppStore。 我已经生成了正确的生产证书: var push = new PushBroker(); var appleCert = File.ReadAllBytes(@"Utils\Cert.Production.p12"); push.RegisterAppleService(new ApplePushChannelSettings(true, appleCert, "*******")); push.QueueNotification(new AppleNotification() .ForDeviceToken(token) .WithContentAvailable(1) ); push.StopAllServices(); 但是当我尝试从PushSharp发送推送,它会引发以下exception: You have selected the Production server, yet your Certificate does not […]

推送通知中的生产证书错误 – PushSharp

当我在生产环境中使用企业帐户和以下推送通知证书时,我的应用程序正在获取推送通知: 苹果生产iOS推送服务 然后,为了在App Store上发布我的应用程序,我开始使用应用程序商店帐户,无论我尝试什么,苹果都使用以下名称创build生产证书: 苹果推送服务 然后从这个SO ,我才知道苹果已经改变了证书的命名。 我的问题是,我在服务器端使用推夏普和得到以下错误: 您已select生产服务器,但您的证书似乎不是生产证书! 请检查以确保您拥有正确的证书! 这两个解决scheme都不起作用。 我更新了Push Sharp从2.2到3.0 beta,得到了许多编译错误,即使PushSharp类本身不存在,然后尝试从该线程的另一个解决scheme。 从这里下载PushSharp,并通过删除生产线重新编译它,仍然得到相同的错误。 另外那个解决scheme还不太清楚,我不确定是否要评论证书查询线还是什么的,我都试过了,但都没有运气 如何解决这个问题?

Pushsharp apple通知调用SSPI失败错误

我使用PushSharp在C#中发送Apple推送通知,我有我的生产.pem文件及其密码。 下面是我的代码片段。总是得到这个错误.. "A call to SSPI failed, see inner exception. —> System.ComponentModel.Win32Exception: The message received was unexpected or badly formatted-" 要么 "System.IO.IOException: Authentication failed because the remote party has closed the transport stream." 我尝试了几乎所有可用的代码在net.Even尝试MoonAPNS但同样的错误,对于自定义脚本也得到这个SSPI失败错误。 我使用相同的.pem文件,并运行一个PHP脚本发送推送通知到同一台服务器的APN,它的工作原理。 var push = new PushBroker(); var appleCert = File.ReadAllBytes(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ck.pem")); push.RegisterAppleService(new ApplePushChannelSettings(false, appleCert, "pwd")); push.QueueNotification(new AppleNotification() .ForDeviceToken("XXXXXXXXXXXXXXX") .WithAlert("Hello World!") .WithBadge(7) […]