应用程序更新后推送通知令牌是否更改? [英] Does push notification token changes after application update?

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

问题描述

我问的是两种情况:

1)我们从App Store定期更新后

1) After we do a regular update from the App Store

2)在我们模拟更新后,通过从商店下载当前版本并安装&从Xcode中运行新版本,

2) After we simulate an update, by downloading a current version from a Store and installing & running a new version from within Xcode,

是否会推送通知令牌更改?如果有变化,例如多久。每次,或不时?

does push notification token changes? If changes, how often eg. each time, or from time to time?

我问这个,因为我正在做一些测试,我想在更新后保存Documents文件夹。所以这可以像我上面描述的那样轻松完成,从Store下载应用程序,并从Xcode中运行新版本。但是,我注意到推送通知已停止工作。然后我重复这几次(卸载应用程序,从商店安装,然后从Xcode运行升级版本)和每次推送通知都有效。

I ask this, because I was doing some testing, where I want to preserve Documents folder after an update. So this can be easily done like I described above, by downloading the app from the Store, and running a new version from within Xcode. But, I noticed that push notifications stopped to work. Then I repeated this few times (uninstall the app, install it from the store, then run the upgraded version from Xcode) and every time push notifications worked.

我想知道是否这是由于推送通知令牌更改?

I wonder if this was due to push notification token change?

推荐答案

据我所知,

1)定期更新来自App Store - APNS令牌不会改变。

1) Regular update from the App Store - APNS token doesn't change.

2)这有点棘手。我相信令牌的变化。首先,我想告诉您appstore版本使用APNS生产证书,而使用xcode构建运行使用开发版本。它会生成不同的令牌。如果您仍然向Apple推送生产服务器发送推送通知,您将无法获得xcode版本。您需要将它们发送到apple push沙盒服务器。

2) It's a bit tricky. And I believe token changes. First I want to let you know the appstore version uses APNS production certificate and the build run from with xcode uses development one. It will generate different token. And if you still send push notification to the apple push production server, you won't get them on your xcode version. You need to send them to the apple push sandbox server.

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

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