Token Authentication 是 APNs 新推出的推送鉴权方式
Token Authentication 优势
1.同一个账户下所有 App 无论是测试 App 还是正式版 App,都能使用同一个 key 来发推送消息和 voice-over-Internet Protocol (VoIP) 消息,不再需要为每个 App 生成一个证书
2.生成的 Auth Key 不再有过期时间,无需像证书那样每年需要重新生成一次。
3.生成过程简单,不需要繁琐、易错的证书导出操作
现在极光推送集成了Token Authentication
![](https://img.haomeiwen.com/i10864359/c27d86b5d59c9fb9.png)
步骤
1.Bundle ID
Xcode 或者证书-Certificates 都能获取
2.Team ID
Membership--找到会员详细信息
![](https://img.haomeiwen.com/i10864359/542cda2ef38de84e.png)
3.APNs Auth Key(这是一个P8文件)
3.1找到证书-key
![](https://img.haomeiwen.com/i10864359/41265deb6b349916.jpg)
3.2命名-勾选-继续
![](https://img.haomeiwen.com/i10864359/76a23dfff733210e.jpg)
3.3注册
![](https://img.haomeiwen.com/i10864359/6ca1f75be49d278f.jpg)
3.4下载
下载密钥后,由于服务器副本被删除,无法重新下载。如果您此时还没有准备好下载密钥,请单击“完成”并稍后下载。请务必将密钥的备份保存在安全的地方。
![](https://img.haomeiwen.com/i10864359/115ec750c0bbb4ba.jpg)
4.极光后台,填写和上传信息就好了
APNs Auth Key 就是刚刚保存的P8文件
![](https://img.haomeiwen.com/i10864359/c01a65693fc38695.jpg)
网友评论