Skip to content

Update iOS samples to 2.0.0#105

Open
vahancouver wants to merge 2 commits intomainfrom
SDKS-4944-update-ios-samples-to-2.0.0
Open

Update iOS samples to 2.0.0#105
vahancouver wants to merge 2 commits intomainfrom
SDKS-4944-update-ios-samples-to-2.0.0

Conversation

@vahancouver
Copy link
Copy Markdown
Contributor

@vahancouver vahancouver commented Apr 16, 2026

SDKS-4944

[iOS][PingSDK] Update samples apps to the new Ping iOS SDK 2.0.0

Summary by CodeRabbit

  • Chores
    • Updated Swift Package Manager dependencies for the iOS SDK across multiple projects to allow flexible version updates.
    • Updated SDK integration patterns for authentication and user management features to align with latest SDK interfaces.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 16, 2026

Warning

Rate limit exceeded

@vahancouver has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 36 minutes and 40 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 36 minutes and 40 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f3e834a7-788a-433c-9649-405439a375bf

📥 Commits

Reviewing files that changed from the base of the PR and between 351bdfc and efb3c10.

📒 Files selected for processing (3)
  • iOS/swiftui-davinci/Davinci/Davinci/AccessTokenViewModel.swift
  • iOS/swiftui-davinci/Davinci/Davinci/LogOutViewModel.swift
  • iOS/swiftui-davinci/Davinci/Davinci/UserInfoViewModel.swift
📝 Walkthrough

Walkthrough

The changes update SPM dependency constraints for ping-ios-sdk across three Xcode projects from pinned or branch-specific versions to flexible semver ranges allowing minor/patch updates. Additionally, three ViewModels are refactored to use a new daVinciUser() accessor instead of the previous user() method for SDK token, logout, and userinfo operations.

Changes

Cohort / File(s) Summary
SPM Dependency Updates
iOS/swiftui-davinci/Davinci/Davinci.xcodeproj/project.pbxproj, iOS/swiftui-journey-module/JourneyModuleSample/JourneyModuleSample.xcodeproj/project.pbxproj, iOS/swiftui-mfa/MfaSample/MfaSample.xcodeproj/project.pbxproj
Updated ping-ios-sdk version constraints: from exact/branch pinning to upToNextMajorVersion with minimumVersion = 2.0.0, enabling flexible updates within major version bounds.
ViewModel SDK Accessor Updates
iOS/swiftui-davinci/Davinci/Davinci/AccessTokenViewModel.swift, iOS/swiftui-davinci/Davinci/Davinci/LogOutViewModel.swift, iOS/swiftui-davinci/Davinci/Davinci/UserInfoViewModel.swift
Refactored token retrieval, logout, and userinfo calls to use davinci.daVinciUser() instead of davinci.user(); async handling and UI state updates remain unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A hop and a skip, the SDKs align,
From pinned-down versions to ranges so fine,
DaVinciUser now leads the way,
Flexible updates brighten the day!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and concisely summarizes the main change: updating iOS samples to version 2.0.0 of the Ping iOS SDK.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch SDKS-4944-update-ios-samples-to-2.0.0

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 and usage tips.

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.

LGTM

Comment thread iOS/swiftui-davinci/Davinci/Davinci/LogOutViewModel.swift
Comment thread iOS/swiftui-davinci/Davinci/Davinci/AccessTokenViewModel.swift
Comment thread iOS/swiftui-davinci/Davinci/Davinci/UserInfoViewModel.swift
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

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 the current code and only fix it if needed.

Inline comments:
In `@iOS/swiftui-davinci/Davinci/Davinci.xcodeproj/project.pbxproj`:
- Around line 593-594: Three package references (A51313CB2D9C6C640086F846,
A51C18E62CF5247200A78241, A52877762D9C71C400B4885D) still use branch
constraints; update each package reference block to match the migrated reference
(A57584782D9DD9EC00AFD754) by replacing the branch-based spec with kind =
upToNextMajorVersion and minimumVersion = 2.0.0, and then update any
productDependency entries that point at those branch package refs to reference
the consolidated versioned package ref (or the new IDs if you add separate
versioned refs) so all 17 product dependencies use the 2.0.0
upToNextMajorVersion source rather than branch constraints.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ec39def7-a52f-4eb8-b055-bdd431a010a1

📥 Commits

Reviewing files that changed from the base of the PR and between 919a56f and 351bdfc.

📒 Files selected for processing (6)
  • iOS/swiftui-davinci/Davinci/Davinci.xcodeproj/project.pbxproj
  • iOS/swiftui-davinci/Davinci/Davinci/AccessTokenViewModel.swift
  • iOS/swiftui-davinci/Davinci/Davinci/LogOutViewModel.swift
  • iOS/swiftui-davinci/Davinci/Davinci/UserInfoViewModel.swift
  • iOS/swiftui-journey-module/JourneyModuleSample/JourneyModuleSample.xcodeproj/project.pbxproj
  • iOS/swiftui-mfa/MfaSample/MfaSample.xcodeproj/project.pbxproj

Comment on lines +593 to +594
kind = upToNextMajorVersion;
minimumVersion = 2.0.0;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

file="iOS/swiftui-davinci/Davinci/Davinci.xcodeproj/project.pbxproj"

echo "Inspecting ping-ios-sdk package references and requirement styles in:"
echo "  $file"
echo

rg -n -A4 -B2 'XCRemoteSwiftPackageReference "ping-ios-sdk"|branch =|kind =|minimumVersion =' "$file"

Repository: ForgeRock/sdk-sample-apps

Length of output: 9040


Multiple ping-ios-sdk references still use branch constraints instead of version 2.0.0.

The project file contains four separate ping-ios-sdk package references. Only one (A57584782D9DD9EC00AFD754) has been migrated to kind = upToNextMajorVersion with minimumVersion = 2.0.0. The other three still use branch constraints:

  • A51313CB2D9C6C640086F846 → branch "SDKS-3920-update-dependency-managers-6"
  • A51C18E62CF5247200A78241 → branch "develop"
  • A52877762D9C71C400B4885D → branch "SDKS-3920-update-dependency-managers-6"

This leaves 17 product dependencies pointing to branch-based package references instead of the 2.0.0 baseline, fragmenting the dependency resolution across both versioned and branch sources.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@iOS/swiftui-davinci/Davinci/Davinci.xcodeproj/project.pbxproj` around lines
593 - 594, Three package references (A51313CB2D9C6C640086F846,
A51C18E62CF5247200A78241, A52877762D9C71C400B4885D) still use branch
constraints; update each package reference block to match the migrated reference
(A57584782D9DD9EC00AFD754) by replacing the branch-based spec with kind =
upToNextMajorVersion and minimumVersion = 2.0.0, and then update any
productDependency entries that point at those branch package refs to reference
the consolidated versioned package ref (or the new IDs if you add separate
versioned refs) so all 17 product dependencies use the 2.0.0
upToNextMajorVersion source rather than branch constraints.

Copy link
Copy Markdown
Contributor

@spetrov spetrov left a comment

Choose a reason for hiding this comment

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

LGTM! 👍🏻

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.

4 participants