【问题标题】:APNS Certificate Issue while sending notification to iOS App向 iOS App 发送通知时出现 APNS 证书问题
【发布时间】:2015-12-21 07:07:21
【问题描述】:

要向我的临时应用程序发送通知,我之前选择了分发 APNS 服务。我已成功收到通知。

但是现在在创建证书时,我很困惑在门户中选择哪一个..

选择(沙盒和生产)并创建 .p12 文件并上传到我的服务器.. 但我收到以下错误 您已选择生产服务器,但您的证书似乎不是生产证书!请检查以确保您拥有正确的证书!

我发现问题是由于 PushSharp,

https://github.com/Redth/PushSharp/issues/585#issue

但无法编辑/修改该类中的代码。

请帮帮我

谢谢...

【问题讨论】:

    标签: ios apple-push-notifications


    【解决方案1】:

    对于开发通知: 选择-“Apple Push Notification service SSL(SandBox)”

    对于生产/分发通知: 选择 - “Apple Push Notification service SSL(SandBox & Production)”

    【讨论】:

    • 我观察到另一个不同之处,对于我以前的应用程序,它显示“Apns 生产”,但对于新应用程序 ID,它在门户中显示“Apple 推送服务”。请查看链接dropbox.com/s/1w5ruckfwbkhcaf/…
    • 我可以知道你的服务器吗?是 php 还是 .net?
    • 是的,没问题,它的 .net
    • 在生产模式下看到门户我想知道为什么又是沙箱 .. 以前我认为沙箱意味着开发,否则它的生产
    • 使用私钥导出 .p12 文件。
    【解决方案2】:

    在我的服务器端更改为以下代码后

    pushBroker.RegisterAppleService(new ApplePushChannelSettings(true, appleCertificate, password));

    pushBroker.RegisterAppleService(new ApplePushChannelSettings(true, appleCertificate, password, true));

    更改:向构造函数添加了一个参数以禁用证书检查。

    现在我收到旧/新证书的通知..

    谢谢..

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-10-01
      • 2017-10-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多