Skip to content

iOS: fix getLatestRollbackInfo declaration in CodePush.h - #99

Open
ofalvai wants to merge 1 commit into
masterfrom
fix-get-latest-rollback-info-decl
Open

ofalvai wants to merge 1 commit into
masterfrom
fix-get-latest-rollback-info-decl

Conversation

@ofalvai

@ofalvai ofalvai commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

CodePush.h declares +getRollbackInfo, but nothing implements it. The method in CodePush.m is +getLatestRollbackInfo, so clang warns with -Wincomplete-implementation in both CocoaPods and SPM builds.

The header name is a typo from the original rollback retry feature (microsoft/react-native-code-push#1467). That PR added the declaration and the implementation together, with the same doc comment and different names. The bridge method, the JS caller and Android all use getLatestRollbackInfo.

Renaming a method in the public header is safe here. A call to the old name crashes at runtime with "unrecognized selector", so no working code uses it.

Out of scope

The rollback helpers in the public header (getLatestRollbackInfo, setLatestRollbackInfo:, getRollbackCountForPackage:fromLatestRollbackInfo:) are internal bookkeeping. Removing them from the header could break consumers, so that needs its own change.

🤖 Generated with Claude Code

@ofalvai ofalvai self-assigned this Oct 28, 2026
Copilot AI balanced review requested due to automatic review settings October 28, 2026 13:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the rollback-info declaration rename.

No open issues 🎉

What changed in this PR

Corrects the iOS rollback-info method declaration to match the existing implementation, resolving the -Wincomplete-implementation warning without changing runtime behavior.

Changes:

  • Renames +getRollbackInfo to +getLatestRollbackInfo in the public header.
File Description
ios/​CodePush/​CodePush.h Aligns the rollback-info declaration with the implemented method name.

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants