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

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

问题描述

我问的是两种情况:

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 文件夹.所以这可以很容易地完成,就像我上面描述的那样,通过从商店下载应用程序,并从 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 运行的构建使用开发版本.它将生成不同的令牌.如果你仍然向苹果推送生产服务器发送推送通知,你将不会在你的 xcode 版本上收到它们.您需要将它们发送到苹果推送沙盒服务器.

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天全站免登陆