I am asking about two situations:
1) After we do a regular update from the App Store
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?
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?
As far as I know,
1) Regular update from the App Store - APNS token doesn't change.
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.