是推送通知令牌在所有的应用程序唯一一台设备? [英] Are push notification tokens unique across all apps for a single device?

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

问题描述

我会在App Store和1城市飞艇帐户的多个应用程序发送推送通知到所有这些设备。我想知道的是,如果每个苹果设备有相同的跨所有应用程序推标记?这更多的是一种数据库结构的事情,所以,如果一个单一的设备使用了许多我的应用程序,我不重复推令牌很多次了。

I will have multiple applications on the app store and 1 urban airship account to send push notifications to all of these devices. What I want to know is if each Apple device has the same "push token" across all applications? This is more of a database architecture thing so that I don't duplicate a push token many times if one single device uses many of my apps.

如果每个苹果设备会为每个应用程序的唯一推令牌已经安装在我的体系结构需要改变。

If each Apple device generates a unique push token for each application it has installed my architecture needs to change.

推荐答案

设备令牌是每台设备不完全是独一无二的;他们每个操作系统安装独一无二的。因此,如果用户购买了新设备,但不会从备份中恢复,那么他们将获得一个新的设备令牌。如果一个设备被抹去,它会得到一个新的设备令牌,因此新用户并没有得到老用户的信息。

Device tokens are not exactly unique per device; they're unique per operating system installation. So if a user buys a new device but does not restore from backup, then they'll get a new device token. And if a device is wiped, it will get a new device token, so the new user doesn't get the old user's messages.

此外,也有不同的令牌使用沙盒和分配的应用程序使用生产系统返回的开发应用。

In addition, there are different tokens returned for development apps using the sandbox and distribution apps using the production system.

由于一个用户可能在多个设备上合法(iPhone和iPad,例如)安装在您的应用程序,它会更加安全有很多的用户和设备标记之间一对多的关系,是在安全方面。

Since a single user might have your app installed on multiple devices legally (iPhone and iPad, for instance), it will be much safer to have a many to many relationship between users and device tokens, to be on the safe side.

既然你提到的城市飞艇,你可能会发现,我们的别名功能有助于为这样的事情;你可以指定一个非唯一的别名​​在我们的终端不同的记号,然后我们会跟踪用户及其设备标记之间的映射。请参阅注册和推动 UA文档的部分。

And since you mentioned Urban Airship, you might find that our alias feature helps for this sort of thing; you can assign a non-unique alias to the different tokens in our end, and then we'll keep track of the mapping between your users and their device tokens. See the registration and push parts of the UA documentation.

编辑:更新,因为我看到了这个古老的回答一些upvotes。由于iOS的7,设备令牌是为每个应用程序唯一的,即使在同一设备上。

An update because I saw some more upvotes on this old answer. As of iOS 7, device tokens are unique for each application, even on the same device.

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

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