ios - What causes APNS token to change? -
is there difference between token lifetime on sandbox vs production?
i locked using sandbox environment @ moment , wondering causing token expire/reset.
i not uninstalling app nor updating ios version between apparent token expirations.
i force close , background app part of dev/testing.
i using voip certificate believe valid both production , sandbox.
the app being run on ios devices built , pushed direct xcode.
what appears happening token gets changed sometime between when app no longer running on receiving device , when should receiving push notification. app doesn't have chance run update token before then.
it's not documented invalidates apns token, docs mention:
if user restores backup data new device or computer, or reinstalls operating system, device token changes.
however, imagine these aren't scenarios cause token expire. is documented fact should not cache token instead pull system if & when required.
see registering remote notifications, specifically:
moreover, never cache device token , give provider; token system whenever need it. if app has registered, calling registerforremotenotifications results in operating system passing device token delegate without incurring additional overhead. note delegate method may called time device token changes, not in response app registering or re-registering.
Comments
Post a Comment