简体   繁体   English

生成新证书后推送通知不起作用

[英]Push notifications not working after generating new certificate

My app was configured to use push notifications and was working fine.我的应用程序被配置为使用推送通知并且工作正常。 My certificate expired and another of the team members created a new cert and sent me the p12 file to use.我的证书过期了,另一个团队成员创建了一个新证书,并将 p12 文件发送给我以供使用。 Got the certificate and updated the mobileprovision to use this new certificate.获得证书并更新 mobileprovision 以使用此新证书。

I also regenerated the pem files for push notification.我还为推送通知重新生成了 pem 文件。 But now my push notifications don't work.但是现在我的推送通知不起作用。

I tried generating the pem files twice already but apns wouldn't work.我已经尝试生成 pem 文件两次,但 apns 不起作用。

Can someone let me know what the issue could be?有人可以让我知道可能是什么问题吗?

Thanks.谢谢。

Take in mind that if there is an invalid deviceToken sent when sending notifications, Apple will silently drop every message sent.请记住,如果在发送通知时发送了无效的 deviceToken,Apple 将静默丢弃所有发送的消息。 So I guess that the problem may be that you have invalid deviceToken (probably from previous cert) that are being sent with your current cert.所以我想问题可能是你有无效的 deviceToken (可能来自以前的证书)与你当前的证书一起发送。 Are you registering with the Feedback service?您是否注册了反馈服务?

  1. Perform a soft-reset of the device执行设备的软重置
  2. Turned off push notifications on the device and turned them on again关闭设备上的推送通知并再次打开它们
  3. Turned off push notifications for the app and turned them on again in the settings关闭应用程序的推送通知并在设置中再次打开它们

Not sure what part made the difference but push notifications work again!!不确定是什么部分有所不同,但推送通知再次起作用! Yay!!耶!!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM