推送通知,令牌会过期吗? [英] Push Notification, token expire?

查看:268
本文介绍了推送通知,令牌会过期吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一个移动应用程序,我的推送通知。

I'm working on a mobile application and i'm on Push Notification.

我可以检索从手机(苹果或Android),一个令牌发送一个推,但我有一个问题:

I can retrieve a token from a phone (apple or android) for send a push but i have a question :

此令牌是永远不变?如果获得一次性令牌,我需要检查,如果令牌变化?

This token is always the same ? If a get one time the token, i need to check if the token change ?

推荐答案

从苹果文档,

令牌信任的这个阶段的形式确保只有的APN生成
  令牌它将后履行,它可以保证本身一
  令牌传递给它由设备是同样的道理,它previously
  置备该特定设备并且仅用于该设备

The form of this phase of token trust ensures that only APNs generates the token which it will later honor, and it can assure itself that a token handed to it by a device is the same token that it previously provisioned for that particular device—and only for that device.

如果用户备份数据还原到一个新的设备,或重新安装
  操作系统,设备令牌的变化。

If the user restores backup data to a new device or reinstalls the operating system, the device token changes.

因此​​,它总是好更新与APN收到该邮件服务器。作为优化的一部分,如果正在接收同样的道理,也没有必要更新该服务器。

So, its always good to update the server with the token received from APN. As part of optimisation, if you are receiving the same token, there is no need to update the server.

这篇关于推送通知,令牌会过期吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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