Azure 通知中心 - 如何在同一个中心设置多个应用程序 [英] Azure notification hubs - how to set multiple apps on the same hub

查看:33
本文介绍了Azure 通知中心 - 如何在同一个中心设置多个应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一种情况,我需要为多个 iOS 应用程序使用同一个通知中心.对于给定的标签 - 所有应用程序都应该收到此推送.

I have a situation where I need to use the same notification hub for several iOS applications. For a given tag - all the applications should receive this push.

每个 iOS 应用都有不同的推送通知证书,因此只有其中一个应用实际收到了推送通知.我不想决定打开多个集线器 - 因为那样我需要管理每个应用程序可能属于哪个集线器 - 这非常尴尬.

Each iOS app has a different push notification certificate, so only one of the apps actually got the push notification. I don't want to resolve to opening multiple hubs - because then I need to manage which hub each app could belong to - and this is very awkward.

我怎样才能做到这一点?

How can I achieve this?

推荐答案

我很确定您想要做的事情是不可能的,原因有几个.iOS 推送是通过 Apple 技术 APNS 处理的.Apple 规定每个单独的应用程序都必须有自己的捆绑标识符,因此它有自己的特定推送证书.通知中心不支持多个证书(或任何推送提供程序的多个应用程序设置),因此单个中心无法推送到多个应用程序.您被困在构建某种管理层,该管理层知道要与哪个应用程序对话的中心.或者,您可以只要求所有集线器发送相同的消息并使用标签进行实际过滤(要求每个集线器发送一条消息,但只有设备注册了正确标签的集线器才会发送).

I'm pretty certain what you want to do is impossible for several reasons. iOS push is handled via APNS which is an Apple technology. Apple dictates that every individual app has to have it's own bundle identifier and therefore it's own specific push certificate. Notification Hubs doesn't support multiple certificates (or multiple app settings for any of the push providers) so there is no way for an individual hub to push to more than one app. You're stuck having some sort of management layer built which knows which hub to talk to for which app. Alternatively, you could just ask all of your hubs to send the same message and use Tags to do the actual filtering (each hub is asked to send a message but only the hub with a device registered with the right tag does).

这篇关于Azure 通知中心 - 如何在同一个中心设置多个应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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