Azure notification hubs - how to set multiple apps on the same hub

喜你入骨 提交于 2019-11-30 15:59:00

问题


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.

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?


回答1:


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).



来源:https://stackoverflow.com/questions/27247622/azure-notification-hubs-how-to-set-multiple-apps-on-the-same-hub

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!