iOS:推送通知已停止工作 [英] iOS: Push Notifications have stopped working

查看:33
本文介绍了iOS:推送通知已停止工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

推送通知已停止适用于我们 iOS 应用的生产版本.自从我们发布我们的应用程序以来已经有大约一年的时间了,所以我猜这是证书过期的问题.首先,有没有办法验证这确实是问题所在?

Push notifications have stopped working for the production version of our iOS app. It's been about a year since we released our app, so I'm guessing it's an issue with the certificate expiring. First of all, is there any way to verify that this is in fact the problem?

我尝试访问 Apple Developer 站点,使用适当的 App ID 生成新的生产 APNS 证书,下载证书,添加到钥匙串,导出该证书的密钥,并添加替换我们服务器上的现有密钥.这似乎不起作用.这个过程有什么问题吗?有什么地方可以找到解决这个问题的详细步骤吗?

I tried to go to the Apple Developer site, generate a new production APNS certificate with the appropriate App ID, download the certificate, add to keychain, export the key for that certificate, and add replace the existing key on our server. This did not seem to work. Does anything about that process seem off? Is there somewhere I can find detailed steps for solving this problem?

我正在使用 JavaPNS 发送通知,它报告它们已成功发送,但它们没有显示在设备上.

I'm using JavaPNS to send the notifications, and it reports that they are being sent successfully, but they are not showing up on the devices.

编辑 #2:我在 JavaPNS 的文档中看到了这一点.

EDIT #2: I see this in the docs for JavaPNS.

重要:如果你尝试推送一个,你不会得到任何错误通过与您的不匹配的 APNS 服务器的通知证书(沙盒或生产),服务器端或应用程序端,但您的通知永远不会发送到您的移动应用程序.你必须非常小心,证书提供给 JavaPNS 的与当前内置于您的手机中的相匹配应用程序,并且它与您选择的 APNS 服务器相匹配使用(沙箱或生产).任何不符合这三项的都会导致通知丢失.

Important: you will not get any error if you try to push a notification through an APNS server that does not match your certificate (sandbox or production), either server-side or application-side, but your notification will never make it to your mobile application. You must be very careful that the certificate provided to JavaPNS matches the one currently built into your mobile application, and that it matches the APNS server you are choosing to use (sandbox or production). Any failure to match these three will result in missing notifications.

您必须非常小心,确保提供给 JavaPNS 的证书与您的移动应用程序中当前内置的证书相匹配,"

"You must be very careful that the certificate provided to JavaPNS matches the one currently built into your mobile application,"

匹配"是什么意思?只是 AppID?

What does it mean by "matches"? Just the AppID?

推荐答案

Apple 推送通知服务 (APNS) 证书有效期为一年,必须每年更新.您可以创建新证书或续订旧证书.

The Apple Push Notification Service (APNS) certificate, lasts for one year and must be renewed annually. You can create a new certificate or renew your older certificate.

可能不是立竿见影的,稍等一下看看是否有效.

It is maybe not immediate, wait a little to see if it worked.

这篇关于iOS:推送通知已停止工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆