简体   繁体   English

来自一台服务器的多个应用程序的IOS推送通知

[英]IOS Push Notifications for multiple Apps from one server

We have 2 apps setup for Push Notifications. 我们为Push Notifications设置了2个应用程序。 (A and B) (A和B)

There are different profiles for each (of course) and we've generated separate certs for each. 每个(当然)都有不同的配置文件,我们为每个配置文件生成了单独的证书。 App A receives Push notifications just fine, App B doesn't. App A接收推送通知就好了,App B没有。

Both are talking to the same server - and it does figure out which app it's sending notifications to and uses the correct cert. 两者都在与同一台服务器通信 - 它确实找出了向哪些应用发送通知并使用正确的证书。

I've noticed that if you install both apps on one device, they both get the same Token (which our server tracks per app.). 我注意到如果你在一台设备上安装这两个应用程序,它们都会得到相同的令牌(我们的服务器跟踪每个应用程序。)。 When the server sends a msg in this case, it sends it twice to the same Token - once with each cert. 在这种情况下,当服务器发送一个消息时,它会将它发送两次到同一个令牌 - 每个证书一次。 App A will receive the msg, App B won't. App A将收到消息,App B将不会。

When sending the msgs to both apps, the Apple server responds that all messages were sent correctly with no errors. 将msgs发送到两个应用程序时,Apple服务器会响应所有消息都已正确发送且没有错误。 But the msg never shows up for the one app. 但是msg永远不会出现在一个应用程序中。

Any suggestions on where to look? 关于在哪里看的任何建议?

After much searching and looking, I found this question: Iphone - Multiple Apps, Different App ID, Same Token 经过多次搜索和查找,我发现了这个问题: Iphone - 多个应用程序,不同的应用程序ID,相同的令牌

It points out that you must use a different .certSigningRequest for each app. 它指出您必须为每个应用程序使用不同的.certSigningRequest。 I checked with our AppStore guy, and he had used the same one for both certs. 我和我们的AppStore家伙一起检查过,他对两个证书使用了相同的一个。 He fixed that, and now it works! 他解决了这个问题,现在它有效了!

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

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