Repository navigation
Conversation
ofalvai
force-pushed
the
replace-jwt-pods-with-codepushcore
branch
from
October 27, 2026 20:56
065f3b8 to
7146c4a
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Setting s.swift_version to 5.9 selects a nonexistent Swift language mode, causing the newly included Swift sources to fail compilation; use 5.0 and specify any minimum toolchain requirement separately.
1 open issue
What changed in this PR
This PR switches iOS CodePush signature verification from the JWT/Base64 pods to the CodePushCore Swift verifier.
Changes:
- Includes Swift verifier sources in the pod and routes Objective-C verification through
CPJWTVerifier. - Removes obsolete public-key preprocessing and classifies verification failures as CodePush errors.
- Updates test-app deployment settings and excludes Swift test/build files from npm publishing.
| File | Description |
|---|---|
test/test.mts |
Sets the generated iOS app’s deployment target to 15.5. |
ios/CodePushCore/Tests/CodePushCoreTests/JWTVerifierTests.swift |
Updates comments to remove references to deleted preprocessing. |
ios/CodePushCore/Sources/CodePushCore/SignatureVerification/RSAPublicKey.swift |
Clarifies inline PEM handling in a comment. |
ios/CodePush/CodePushUpdateUtils.m |
Uses the Swift verifier and wraps verification errors. |
ios/CodePush/CodePush.h |
Removes the obsolete public-key preprocessing declaration. |
CodePush.podspec |
Includes Swift sources, configures Swift, and removes JWT/Base64 dependencies. |
.npmignore |
Excludes Swift tests, package manifest, and build metadata. |
Review effort: Balanced
This was referenced Oct 28, 2026
ofalvai
force-pushed
the
replace-jwt-pods-with-codepushcore
branch
from
October 28, 2026 10:31
7146c4a to
f1f5149
Compare
ofalvai
force-pushed
the
replace-jwt-pods-with-codepushcore
branch
from
October 28, 2026 10:43
f1f5149 to
fe94e58
Compare
ofalvai
marked this pull request as ready for review
October 28, 2026 12:14
gsanta
approved these changes
Oct 28, 2026
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.

Part 2 of the stack that removes the
JWTandBase64pods. #94 explains the wider context.What changes
CodePushUpdateUtils.mverifies the update signature withCPJWTVerifierfrom Add CodePushCore Swift package for JWT signature verification #94.CodePush.podspecdrops theJWTandBase64dependencies, and adds the Swift sources.getKeyValueFromPublicKeyString:from the old ObjC code is gone: the Swift side now removes the PEM armor anyway, there is no need to handle this in two places.IPHONEOS_DEPLOYMENT_TARGET = 15.5. A pod with Swift sources needs the app's deployment target to be at least the pod's, and the generated project's default is lower.Behavior changes to review
+[CodePushErrorUtils isCodePushError:]matches it and+[CodePush saveFailedUpdate:]adds the update to the failed list. A retry cannot fix a bad signature, so I think this is correct.alg. The verifier rejects everyalgexcept RS256 before it checks the signature. The old code also pinned RS256 through the library, and the CodePush CLI signs only with RS256, so the result should be the same.BEGIN/END PUBLIC KEYlines. The new code removes any PEM armor, so a PKCS#1RSA PUBLIC KEYin Info.plist also works.Verification
Besides the passing CI checks, manually verified:
pod installin an RN app with static libraries: onlyCodePushandSSZipArchive (2.5.5)inPodfile.lock.npm pack --dry-run: theCodePushCoresources ship. No JWT/Base64 files and noPackage.swift.🤖 Generated with Claude Code