Skip to content

Conversation

@sidorchukandrew
Copy link
Collaborator

Description

This PR updates the version of the Swift SDK we're depending on. With this update, there are a number of changes that needed to be made to match the new API interface.

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation update
  • refactor: Code refactoring (no functional changes)
  • perf: Performance improvement
  • test: Test additions or updates
  • build: Build system or dependency changes
  • ci: CI configuration changes
  • chore: Other changes (maintenance, etc.)

Breaking Changes

  • This PR contains BREAKING CHANGES

Breaking Change Details:
The Swift SDK updates introduced a number of changes to field names. This is reflected in the modifications I made to the types file.

Checklist

  • My code follows the project's code style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • All commit messages follow conventional commits format
  • I have updated the appropriate section in documentation (if needed)

@sidorchukandrew sidorchukandrew self-assigned this Jan 14, 2026
@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@greptile-apps
Copy link

greptile-apps bot commented Jan 14, 2026

Greptile Summary

This PR updates the React Native SDK to depend on Swift SDK version 1.0.1 (from 0.1.0), introducing several breaking changes to align with the new API interface.

Major Breaking Changes

  • Authentication permissions: Changed from app-specific scopes (bibles, highlights, votd, demographics, bible_activity) to standard OAuth2/OIDC scopes (openid, email, profile)
  • User info fields: Renamed from firstName/lastName/userId/avatarUrl to name/email/id/profilePicture
  • User info implementation: Changed from async API call to synchronous static properties (YouVersionAPI.Users.currentUserName, etc.)
  • Bible version fields: Renamed copyrightLong/copyrightShort to promotionalContent/copyright
  • Bible book fields: Renamed usfm to id, titleLong to fullTitle, removed bookUSFM and isCanonical from chapters
  • Language fields: Renamed defaultBibleVersionId to defaultBibleId
  • Bible text events: Changed onVerseTap callback from providing point coordinates to urlScheme string and footnotes array
  • Footnote modes: Added new modes letters and image alongside existing none, inline, and marker
  • Sign-in response: Added idToken field to SignInWithYouVersionResult

All changes are consistently applied across TypeScript types, Swift implementations, tests, mocks, and the example app.

Confidence Score: 4/5

  • This PR is safe to merge with one minor concern about the unused accessToken parameter
  • The changes are well-executed with consistent field renaming across all layers (types, Swift code, tests, mocks, and examples). However, the confidence is 4/5 rather than 5/5 because the userInfo method still accepts an accessToken parameter that is no longer used by the implementation, which could indicate incomplete refactoring or potential future issues if the parameter was previously required for authorization
  • Pay attention to ios/YVPAuthAPI.swift regarding the unused accessToken parameter in the userInfo method

Important Files Changed

Filename Overview
ios/YouVersionReactNative.podspec Updated Swift SDK dependencies from 0.1.0 to 1.0.1 (major version bump)
src/types.ts Renamed fields to match new Swift SDK API: userInfo fields (firstName/lastName → name), permissions (bibles/highlights → openid/email/profile), BibleVersion (copyrightLong/Short → promotionalContent/copyright), BibleBook (usfm → id), and added new footnote modes
ios/YVPAuthAPI.swift Updated userInfo to use synchronous static properties instead of async API call, added idToken to sign-in response
ios/APIs/YVPBibleAPI.swift Updated record field names to match Swift SDK changes: copyrightLong/Short → promotionalContent/copyright, usfm → id, titleLong → fullTitle, bookUSFM/isCanonical → id
ios/Views/YVPBibleTextView.swift Updated onVerseTap callback signature to use urlScheme and footnotes instead of point coordinates, added new footnote modes (letters, image)

Sequence Diagram

sequenceDiagram
    participant App as React Native App
    participant Module as YV Platform Module
    participant Auth as YVPAuthAPI
    participant SDK as Swift SDK v1.0.1
    participant User as End User

    Note over App,SDK: Sign In Flow Changes
    App->>Module: signIn with permissions
    Module->>Auth: Process sign in
    Auth->>SDK: Call signIn API
    SDK->>User: OAuth flow
    User-->>SDK: Authenticates
    SDK-->>Auth: Return auth result
    Auth-->>Module: Map to JS object
    Module-->>App: Return result with new fields

    Note over App,SDK: User Info Flow Changes
    App->>Module: Request user info
    Module->>Auth: Get user info
    Note over Auth,SDK: Changed to synchronous
    Auth->>SDK: Read static properties
    SDK-->>Auth: Return user data
    Auth-->>Module: Map with renamed fields
    Module-->>App: Return user info

    Note over App,SDK: Bible Text Interaction Changes
    App->>Module: Render BibleTextView
    Module->>SDK: Display text
    User->>SDK: Tap verse
    SDK-->>Module: Callback with new params
    Module-->>App: Event with urlScheme
Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

9 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Copy link
Collaborator

@mic-mart mic-mart left a comment

Choose a reason for hiding this comment

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

Great work @sidorchukandrew !

@sidorchukandrew sidorchukandrew merged commit a042211 into main Jan 16, 2026
1 check passed
@sidorchukandrew sidorchukandrew deleted the as/swift-updates branch January 16, 2026 20:08
jhampton pushed a commit that referenced this pull request Jan 16, 2026
## 0.8.0 (2026-01-16)

* chore: Depend on most recent Swift SDK version and update breaking changes (#27) ([a042211](a042211)), closes [#27](#27)
* chore(ci): Disable NPM tokens in release workflow (#28) ([c63c21a](c63c21a)), closes [#28](#28)
* chore(ci): update semantic-release to support OIDC workflow (#29) ([de337dc](de337dc)), closes [#29](#29)
* chore(ci): YPE-1050 Modify release.yml for permissions and Node.js version ([2c86c6f](2c86c6f))
* Add NODE_AUTH_TOKEN to release workflow ([2bdc89c](2bdc89c))
* Add provenance option to npm release configuration ([d746acf](d746acf))
* Enable NPM_CONFIG_PROVENANCE in release workflow ([e027853](e027853))
* Update Node.js version and add NPM upgrade step ([ee94aa2](ee94aa2))
* feat: add support for `configure` in Kotlin (#16) ([d9bca2d](d9bca2d)), closes [#16](#16)
* feat: implement `setApiHost` and `getAccessToken` in Kotlin (#17) ([a4ee43c](a4ee43c)), closes [#17](#17)
* feat: Implement `SignInWithYouVersionButton` for Kotlin (#26) ([5072471](5072471)), closes [#26](#26)
* feat: Implement API utils for Kotlin/Android (#25) ([9a88926](9a88926)), closes [#25](#25)
* feat: implement votd API endpoint for Kotlin (#19) ([59e6874](59e6874)), closes [#19](#19)
* docs: add AI agent code review guidelines (#23) ([8218cec](8218cec)), closes [#23](#23)
@github-actions
Copy link

🎉 This PR is included in version 0.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants