Skip to content

chore: bump Android and iOS SDK dependencies to 2.1.0(SDKS-5245)#60

Open
tsdamas wants to merge 1 commit into
mainfrom
SDKS-5245
Open

chore: bump Android and iOS SDK dependencies to 2.1.0(SDKS-5245)#60
tsdamas wants to merge 1 commit into
mainfrom
SDKS-5245

Conversation

@tsdamas

@tsdamas tsdamas commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Bumps the native Ping Android SDK (com.pingidentity.sdks:*) and Ping iOS SDK (Ping* pods) from 2.0.x to 2.1.0 across every package, and updates build tooling to match the new SDK's requirements.

  • Android: bumped com.pingidentity.sdks:* to 2.1.0 in all 14 packages' build.gradle. The 2.1.0 artifacts are compiled for JVM 21, so sourceCompatibility/targetCompatibility/kotlinOptions.jvmTarget were raised to 21 in every package, plus PingSampleApp and PingTestRunner app modules. Added react.internal.disableJavaVersionAlignment=true to both apps' gradle.properties to stop React Native's Gradle plugin from force-resetting JVM target back to 17, and kotlin.jvm.target.validation.mode=warning to downgrade third-party node_modules JVM-mismatch errors (previously masked by RNGP's alignment) to warnings. Pinned the Kotlin Gradle plugin classpath explicitly to the declared kotlinVersion in both apps to avoid an unrelated/older Kotlin compiler resolving and choking on kotlin-stdlib metadata pulled in transitively by the SDK (e.g. via ktor-client).
  • iOS: bumped all Ping* pod dependencies to 2.1.0 across every package's podspec, and PingExternalIdP* pods to 2.1.0 in PingSampleApp/ios/Podfile. Added RecaptchaInterop and GoogleUtilities with :modular_headers => true to the sample app's Podfile, required because PingExternalIdPGoogle -> GoogleSignIn -> AppCheckCore pulls them in and neither defines a module (required by Swift under static linkage).
  • CI: bumped JDK from 17 to 21 in build-and-test-android.yml, browserstack-prep-android-artifacts.yml, and e2e-tests.yml to match the new package JVM target.

Native API adjustments driven by the bump

  • PingOidc 2.1.0 made OidcClientConfig.openId private(set); the only public way to influence the discovered configuration is now openIdOverride, a closure applied after discover() completes. Updated packages/oidc/ios/OidcClientFactory.swift and packages/journey/ios/Factory/JourneyClientFactory.swift to build an openIdOverride closure from the JS-supplied openId payload instead of constructing an OpenIdConfiguration directly. Updated OidcClientFactoryTests accordingly, since the previous test asserted on openId synchronously before discovery runs.
    • Known parity gap (flagged with TODO-PARITY(SDKS-5245) in both files): Android's config parser still allows skipping discovery entirely by supplying openId without a discoveryEndpoint. On iOS, openIdOverride never fires without a prior successful discover() call, so that shortcut no longer works on iOS. Needs a native SDK fix or an Android-side follow-up to keep both platforms behaved the same way.
  • Push module: added a new PushNumberChallengeExceptionpush_number_challenge_error mapping (Android PushErrorMapper.kt, iOS PushErrorMapper.swift, and the shared PushErrorCode TS type) to surface a push SDK error case that had no prior mapping. Added com.pingidentity.sdks:utils:2.1.0 as an explicit implementation dependency in packages/push/android/build.gradle — the push SDK only declares it as a runtime-scope transitive dependency, so ApiException (the actual superclass of PushNumberChallengeException) was invisible to the Kotlin compiler, causing an "always false" instance-check warning on the new mapping and a hard compile error in the new unit test. Added pushNumberChallengeExceptionMapsToPushNumberChallengeError and pushNumberChallengeExceptionMapsToArgumentErrorType to RNPingPushTest.kt to cover the new code path.

Testing

  • yarn packages:build, lint, prettier, typecheck, and test all pass.
  • Android unit tests pass across all packages under JDK 21 (including the two new PushNumberChallengeException tests); PingSampleApp and PingTestRunner both assemble successfully.
  • iOS: pod install resolves cleanly with the 2.1.0 pods and the new modular_headers pods; RNPackagesTests passes.

Known follow-ups

  • No changeset has been added yet for the push package's new public push_number_challenge_error error code; run yarn changeset before merge.

Summary by CodeRabbit

  • New Features
    • Added clear push error reporting for number-challenge failures across Android, iOS, and JavaScript.
    • Improved OIDC configuration overrides while preserving discovery behavior.
  • Updates
    • Upgraded Ping SDK components to version 2.1.0 across Android and iOS integrations.
    • Updated Android builds and sample applications to target Java 21 and aligned Kotlin tooling.
    • Improved iOS authentication dependency compatibility, including updated external identity provider integrations.
  • Bug Fixes
    • Improved handling of optional OIDC endpoints and endpoint overrides during client setup.
  • Tests
    • Added coverage for push number-challenge error mapping and OIDC endpoint overrides.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The PR upgrades Android builds to Java 21, aligns Ping SDK dependencies to 2.1.0, adds modular iOS dependencies, changes OpenID overrides to patch discovered configuration, and adds cross-platform Push number-challenge error mappings.

Changes

Platform and SDK updates

Layer / File(s) Summary
Android Java 21 and SDK alignment
.github/workflows/*, PingSampleApp/android/..., PingTestRunner/android/..., packages/*/android/build.gradle
Android workflows, applications, and modules target Java/Kotlin JVM 21; Ping SDK dependencies are updated to 2.1.0.
CocoaPods SDK version updates
PingSampleApp/ios/Podfile, packages/*/*.podspec
Pod dependencies are updated to 2.1.0, with modular RecaptchaInterop and GoogleUtilities dependencies added.
OpenID discovery overrides
packages/oidc/ios/..., packages/journey/ios/...
Factories now apply endpoint overrides to discovered OpenIdConfiguration values through closures, with updated tests.
Push number-challenge error contract
packages/push/...
Android, iOS, and TypeScript error mappings add push_number_challenge_error; Android tests cover its code and type mappings.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Suggested reviewers: pingidentity-gaurav

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 70.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: bumping Android and iOS SDK dependencies to 2.1.0.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch SDKS-5245

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tsdamas
tsdamas requested a review from rodrigoareis July 24, 2026 16:28

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/oidc/ios/OidcClientFactory.swift`:
- Around line 54-60: Handle OpenID-only configurations explicitly instead of
assigning discovery-dependent overrides: in
packages/oidc/ios/OidcClientFactory.swift lines 54-60 and 108-111, either
preserve standalone payload.openId initialization when discoveryEndpoint is
absent or reject that combination with a clear validation error; in
packages/journey/ios/Factory/JourneyClientFactory.swift lines 90-95, apply the
same rule and do not convert resolver openId-only configurations into
openIdOverride values that require discovery.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5544da85-fa6f-4c3d-95e4-2e057a7edcc2

📥 Commits

Reviewing files that changed from the base of the PR and between 81d22e9 and ceedd1f.

⛔ Files ignored due to path filters (3)
  • .yarn/install-state.gz is excluded by !**/.yarn/**, !**/*.gz
  • PingSampleApp/ios/Podfile.lock is excluded by !**/*.lock
  • PingTestRunner/ios/Podfile.lock is excluded by !**/*.lock
📒 Files selected for processing (48)
  • .github/workflows/browserstack-prep-android-artifacts.yml
  • .github/workflows/build-and-test-android.yml
  • .github/workflows/e2e-tests.yml
  • PingSampleApp/android/app/build.gradle
  • PingSampleApp/android/build.gradle
  • PingSampleApp/android/gradle.properties
  • PingSampleApp/ios/Podfile
  • PingTestRunner/android/app/build.gradle
  • PingTestRunner/android/build.gradle
  • PingTestRunner/android/gradle.properties
  • packages/binding/RNPingBinding.podspec
  • packages/binding/android/build.gradle
  • packages/browser/RNPingBrowser.podspec
  • packages/browser/android/build.gradle
  • packages/core/android/build.gradle
  • packages/davinci/RNPingDavinci.podspec
  • packages/davinci/android/build.gradle
  • packages/device-client/RNPingDeviceClient.podspec
  • packages/device-client/android/build.gradle
  • packages/device-id/RNPingDeviceId.podspec
  • packages/device-id/android/build.gradle
  • packages/device-profile/RNPingDeviceProfile.podspec
  • packages/device-profile/android/build.gradle
  • packages/external-idp/RNPingExternalIdp.podspec
  • packages/external-idp/android/build.gradle
  • packages/fido/RNPingFido.podspec
  • packages/fido/android/build.gradle
  • packages/journey/RNPingJourney.podspec
  • packages/journey/android/build.gradle
  • packages/journey/ios/Factory/JourneyClientFactory.swift
  • packages/logger/RNPingLogger.podspec
  • packages/logger/android/build.gradle
  • packages/oath/RNPingOath.podspec
  • packages/oath/android/build.gradle
  • packages/oidc/RNPingOidc.podspec
  • packages/oidc/android/build.gradle
  • packages/oidc/ios/OidcClientFactory.swift
  • packages/oidc/ios/Tests/OidcClientFactoryTests.swift
  • packages/push/RNPingPush.podspec
  • packages/push/android/build.gradle
  • packages/push/android/src/main/java/com/pingidentity/rnpush/PushErrorCode.kt
  • packages/push/android/src/main/java/com/pingidentity/rnpush/PushErrorMapper.kt
  • packages/push/android/src/test/java/com/pingidentity/rnpush/RNPingPushTest.kt
  • packages/push/ios/PushErrorCode.swift
  • packages/push/ios/PushErrorMapper.swift
  • packages/push/src/types/error.types.ts
  • packages/storage/RNPingStorage.podspec
  • packages/storage/android/build.gradle

Comment on lines +54 to +60
// TODO-PARITY(SDKS-5245): PingOidc 2.1.0 made `openId` private(set); only
// `openIdOverride` (patches fields after discovery completes) is public now.
// Configs that previously relied on `openId` to skip discovery entirely
// (no `discoveryEndpoint`) can no longer do so — `openIdOverride` never
// fires without a prior successful `discover()` call.
if let openId = payload.openId {
config.openIdOverride = openIdOverride(for: openId)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Reject or preserve OpenID-only configurations.

openIdOverride runs only after successful discovery, but these builders still accept openId when discoveryEndpoint is absent. Those configurations now initialize with an empty discovery endpoint and can never apply their supplied endpoints, breaking previously supported login flows. Preserve a standalone-configuration path or reject this combination at the JS/config validation boundary with a clear error.

  • packages/oidc/ios/OidcClientFactory.swift#L54-L60: validate or support payload.openId when payload.discoveryEndpoint is absent for native OIDC clients.
  • packages/oidc/ios/OidcClientFactory.swift#L108-L111: apply the same handling for web OIDC clients.
  • packages/journey/ios/Factory/JourneyClientFactory.swift#L90-L95: do not convert the resolver’s openId-only Journey configuration into a discovery-dependent override.
📍 Affects 2 files
  • packages/oidc/ios/OidcClientFactory.swift#L54-L60 (this comment)
  • packages/oidc/ios/OidcClientFactory.swift#L108-L111
  • packages/journey/ios/Factory/JourneyClientFactory.swift#L90-L95
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/oidc/ios/OidcClientFactory.swift` around lines 54 - 60, Handle
OpenID-only configurations explicitly instead of assigning discovery-dependent
overrides: in packages/oidc/ios/OidcClientFactory.swift lines 54-60 and 108-111,
either preserve standalone payload.openId initialization when discoveryEndpoint
is absent or reject that combination with a clear validation error; in
packages/journey/ios/Factory/JourneyClientFactory.swift lines 90-95, apply the
same rule and do not convert resolver openId-only configurations into
openIdOverride values that require discovery.

@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 65.07937% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.03%. Comparing base (81d22e9) to head (ceedd1f).

Files with missing lines Patch % Lines
...ges/journey/ios/Factory/JourneyClientFactory.swift 21.05% 15 Missing ⚠️
packages/oidc/ios/OidcClientFactory.swift 70.83% 7 Missing ⚠️

❌ Your patch check has failed because the patch coverage (21.05%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.
❌ Your project check has failed because the head coverage (71.03%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##               main      #60      +/-   ##
============================================
- Coverage     71.41%   71.03%   -0.38%     
  Complexity      181      181              
============================================
  Files           154      193      +39     
  Lines         18052    19970    +1918     
  Branches        539      866     +327     
============================================
+ Hits          12891    14186    +1295     
- Misses         5111     5659     +548     
- Partials         50      125      +75     
Flag Coverage Δ
android 17.10% <ø> (ø)
ios 80.49% <65.07%> (+0.02%) ⬆️
javascript 68.27% <ø> (-30.32%) ⬇️
Components Coverage Δ
Bridge glue 51.13% <ø> (+0.12%) ⬆️
Pure logic 81.29% <21.05%> (+0.12%) ⬆️
Files with missing lines Coverage Δ
...ckages/oidc/ios/Tests/OidcClientFactoryTests.swift 100.00% <100.00%> (ø)
packages/push/ios/PushErrorMapper.swift 88.13% <100.00%> (+0.41%) ⬆️
packages/oidc/ios/OidcClientFactory.swift 78.28% <70.83%> (-1.01%) ⬇️
...ges/journey/ios/Factory/JourneyClientFactory.swift 77.51% <21.05%> (+0.99%) ⬆️

... and 39 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 81d22e9...ceedd1f. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://ForgeRock.github.io/ping-react-native-sdk/docs-preview/pr-60/

Built to branch gh-pages at 2026-07-24 19:02 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@tsdamas tsdamas changed the title SDKS-5245:chore: bump Android and iOS SDK dependencies to 2.1.0 chore: bump Android and iOS SDK dependencies to 2.1.0(SDKS-5245) Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant