是APN设备令牌唯一的每个单独的应用程序? [英] Is the APN Device Token unique to each individual app?

查看:115
本文介绍了是APN设备令牌唯一的每个单独的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在iTunes商店两个应用程序 - 都实现推送通知。虽然我是测试将通知发送给这些生产应用程序,我注意到,针对应用一个推的标题是,打开应用程序B.

I have two apps on the iTunes store - both implement push notifications. While I was testing sending notifications to these production apps, I noticed that a push intended for app A was titled and opened app B.

这两个应用程序安装在同一部手机上。我看着在我的设备表,看到该设备令牌(当然,设备ID)的两个应用程序上市都是一样的。

Both of these apps are installed on the same phone. I looked in my device table and saw that the device Tokens (and of course, the Device ID) listed for the two apps were both the same.

根据需要,我现在用的服务器上的两个不同的证书 - 每个应用程序。我有点假设设备令牌或将消息路由到合适的应用程序证书,但显然事实并非如此。

As required, I am using two different certificates on the server - one for each app. I sort of assumed the device Token or certificate would route the message to the right app but clearly it isn't.

我可以的NSLog看到标记正从每个应用程序发送的确实是一样的。

I can see in NSLog that the tokens being sent from each app are indeed the same.

如果设备令牌是唯一的每个应用程序?如果是这样,任何想法,我的测试手机是如何被发送相同的设备令牌同时应用到我的服务器。请记住,这是从目前在App Store上两个应用程序。

Should the device Token be unique to each app? If so, any idea how my test phone could be sending the same device token for both apps to my server. Keep in mind this is from two apps currently on the app store.

感谢您的帮助!

推荐答案

想通了。该设备令牌是不是唯一的手机应用配对。它们是唯一的,以仅在电话。如果你有推同一部手机上的多个应用程序,他们将全部使用相同的设备令牌。该证书用于发送通知将决定它进入哪个应用程序。

Figured it out. The Device Tokens are NOT unique to the phone-app pairing. They are unique to the phone only. If you have multiple apps with push on the same phone they will all use the same Device Token. The certificate you use to send the notification will dictate which app it goes to.

这篇关于是APN设备令牌唯一的每个单独的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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