ios - Azure iOS 推送通知在生产模式下未收到?

标签 ios azure apple-push-notifications azure-notificationhub

我正在将 Azure 通知中心与我的 iOS 应用程序结合使用。最初,我使用沙盒模式在集线器中进行测试,并且它有效。发布应用程序后,未收到推送通知。然后,我将推送通知证书更改为生产,并将新的 .p12 文件上传到集线器并进行测试,但它再次适用于沙箱,但不适用于生产模式。

我是否必须发布应用程序才能确保新证书适用于生产模式?

最佳答案

您使用的是同一个集线器还是两个具有沙箱和生产证书的不同集线器?根据Azure Notification Hubs troubleshooting guide您必须使用两个单独的:

Apple Push Notification Service (APNS) configuration

You must maintain two different hubs - one for production and another for testing purpose. This means uploading the certificate you are going to use in sandbox environment to a separate hub and the certificate you are going to use in production to a separate hub. Do not try to upload different types of certificates to the same hub as it may cause notification failures down the line. If you do find yourself in a position where you have inadvertently uploaded different types of certificate to the same hub, it is recommended to delete the hub and start fresh. If for some reason, you are not able to delete the hub then at the very least, you must delete all the existing registrations from the hub.

此外,请参阅 detailed step-by-step guide for developing iOS apps with Azure Notification Hubs 。看看他们是如何在那里设置证书的,它应该可以工作。

如果这些都没有帮助,请在评论中指出它仍然失败的地方。

关于ios - Azure iOS 推送通知在生产模式下未收到?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38847071/

相关文章:

ios - IBOutlets 和 IBactions 需要!到底

c# - Azure函数不向服务总线主题发送消息

消息应用程序的 IOS 推送通知

ios - 无法访问互联网后推送通知会怎样?

ios - 在 Swift 中对协议(protocol)数组进行排序?

ios - 从后台线程返回函数

azure - 创建 Microsoft Azure 容器服务 (DC/OS) 时配置现有 VNET

azure - Terraform Cloud 无法在 Azure 中国订阅中部署资源

ios - 接收重复的推送通知 ios9

IOS 8 忽略我的媒体查询