feature/cp-11597-ios-implement-regenerating-the-push-token-by-system#377
Open
cpandya25 wants to merge 2 commits into
Open
feature/cp-11597-ios-implement-regenerating-the-push-token-by-system#377cpandya25 wants to merge 2 commits into
cpandya25 wants to merge 2 commits into
Conversation
implemented feature of regenerate APNS token on server-requested push token refresh via regeneratePushTokenRequestedAt timestamp comparison
There was a problem hiding this comment.
1 issue found across 2 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
implemented feature of regenerate APNS token on server-requested push token refresh via regeneratePushTokenRequestedAt timestamp comparison
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default mode and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b2fbd7c. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

implemented feature of regenerate APNS token on server-requested push token refresh via regeneratePushTokenRequestedAt timestamp comparison
Note
Medium Risk
Changes device-token handling and subscription sync flow based on a backend-provided timestamp, which could impact push delivery if the refresh/resync loops or fails. Scope is localized to subscription sync and user-defaults persistence.
Overview
Adds server-driven APNS token regeneration during subscription sync: when
regeneratePushTokenRequestedAtreturned by the backend changes, the SDK clears local token state, requests a fresh device token, persists the new timestamp, and triggers a follow-upsyncSubscription.Introduces a new persisted user-defaults key
CLEVERPUSH_REGENERATE_PUSH_TOKEN_REQUESTED_AT_KEYto track the last processed refresh request.Reviewed by Cursor Bugbot for commit b2fbd7c. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Implements server-driven APNS token regeneration on iOS (CP-11597) by detecting changes to a
regeneratePushTokenRequestedAttimestamp and re-requesting the device token. After a fresh token is received, the new timestamp is saved and the subscription is re-synced.CLEVERPUSH_REGENERATE_PUSH_TOKEN_REQUESTED_AT_KEYin user defaults.hasRequestedDeviceToken = NO, and callrequestDeviceTokenfollowed bygetDeviceToken.syncSubscription.Written for commit b2fbd7c. Summary will update on new commits. Review in cubic