Skip to content

Conversation

@predatorx7
Copy link
Collaborator

@predatorx7 predatorx7 commented Dec 12, 2025

Summary by CodeRabbit

  • New Features

    • App theme override support added
    • potentialFailureReasonsLink now included in themes
  • Bug Fixes

    • Fixed feature flag overrides interrupting certain login pages and returning incorrect values for non-overridden fields
  • Chores

    • Updated default feature flag values
    • Release version bumped to 0.27.0 and changelog updated

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 12, 2025

Walkthrough

Bumps SDK/version references from 0.25.0 → 0.27.0 across manifests, packaging, scripts, and docs; adds an optional theme: String? field to app-info override types and wires it through serialization and the set-overrides API.

Changes

Cohort / File(s) Summary
Version bump — manifests & packaging
Package.swift, Devel/Package.swift.prod, ReclaimInAppSdk.podspec, Devel/podspec.prod, Sources/ReclaimInAppSdk/Resources/InAppSdk.version, Scripts/download_frameworks.sh, Examples/SwiftUIWithPodExample/Podfile
Updated SDK version references from 0.25.0 to 0.27.0; replaced binaryTarget/xcframework URLs and checksums, updated podspec version and download URLs, and adjusted download script/version constant.
Changelog & README
CHANGELOG.md, README.md
Added changelog entry for 0.27.0 and updated README references from 0.25.00.27.0.
Theme field additions — SDK types & wiring
Sources/ReclaimInAppSdk/Messages.swift, Sources/ReclaimInAppSdk/ReclaimOverrides.swift, Sources/ReclaimInAppSdk/ReclaimVerification.swift
Added optional theme: String? to ClientReclaimAppInfoOverride and ReclaimAppInfo; updated init/serialization/deserialization and passed theme into the set-overrides call.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Pay attention to:
    • Binary target URL/checksum consistency across Package.swift and Devel/Package.swift.prod.
    • Podspec s.version and xcframework_urls updates.
    • Correct propagation and optional handling of the new theme field in Messages.swift, ReclaimOverrides.swift, and ReclaimVerification.swift.

Possibly related PRs

Suggested reviewers

  • kryptocodes
  • Sajjad21990

Poem

🐰 A tiny hop from bump to bloom,
Theme tucked in, it finds its room,
URLs updated, checksums neat,
Version 0.27 on repeat,
Cheers — a carrot-shaped release treat 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Update 0.27' is vague and generic, using a version number without explaining what was actually updated or changed. Provide a more descriptive title that indicates the specific changes, such as 'Release version 0.27.0' or 'Update SDK and dependencies to version 0.27.0'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch pre-0.27.0

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f7ff655 and 0edf7d4.

📒 Files selected for processing (1)
  • Sources/ReclaimInAppSdk/ReclaimOverrides.swift (1 hunks)
🔇 Additional comments (1)
Sources/ReclaimInAppSdk/ReclaimOverrides.swift (1)

210-222: Previous issue resolved—LGTM!

The type mismatch flagged in the previous review has been fixed. The theme parameter on line 216 is now correctly declared as theme: String? = nil, matching the property type public let theme: String? on line 210. The implementation is correct and consistent.


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

@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: 2

🧹 Nitpick comments (4)
Scripts/download_frameworks.sh (2)

16-23: Keep the hardcoded version, but harden the download path (curl fail/retries/timeouts).
Given this script is commonly run standalone, consider making the download step fail fast on HTTP errors and be less flaky (e.g., curl -fL --retry ... --connect-timeout ...). Based on learnings, keep the version hardcoded.

Proposed patch:

@@
-RECLAIM_SDK_VERSION="0.27.0"
+RECLAIM_SDK_VERSION="0.27.0"
 DOWNLOAD_URL="https://reclaim-inapp-sdk.s3.ap-south-1.amazonaws.com/ios/${RECLAIM_SDK_VERSION}/ReclaimXCFrameworks.tar.gz"
@@
-curl -L "$DOWNLOAD_URL" -o "$TEMP_ARCHIVE"
+curl -fL \
+  --retry 3 --retry-delay 2 --retry-connrefused \
+  --connect-timeout 10 --max-time 300 \
+  "$DOWNLOAD_URL" -o "$TEMP_ARCHIVE"

6-11: Quote vars and avoid ls | grep parsing to prevent accidental deletes/renames.
Today it’s “probably fine”, but rm -rf $TARGET_DIR and ls | grep ... are classic footguns if filenames contain spaces/newlines or multiple matches occur.

Proposed patch:

@@
-XCODE_PROJECT_FILE="$(ls | grep .xcodeproj)"
+XCODE_PROJECT_FILE="$(ls -1 | grep -E '\.xcodeproj$' | head -n 1)"
@@
-rm -rf $TARGET_DIR
+rm -rf -- "$TARGET_DIR"
@@
-RECLAIM_INVALID_FILE_NAME="$(ls | grep reclaim_inapp_sdk)"
+RECLAIM_INVALID_FILE_NAME="$(ls -1 | grep -E '^reclaim_inapp_sdk' | head -n 1)"
@@
-    mv "$RECLAIM_INVALID_FILE_NAME" $TARGET_DIR
+    mv -- "$RECLAIM_INVALID_FILE_NAME" "$TARGET_DIR"

Also applies to: 37-61

README.md (1)

348-349: Avoid “latest version is …” unless you’re committing to updating it every release.
This line will become wrong as soon as 0.28.0 ships; consider rephrasing to “Current release: 0.27.0” or linking to Releases instead.

ReclaimInAppSdk.podspec (1)

63-70: Consider curl -f (and maybe retries) in prepare_command to avoid silent bad downloads.
Right now a 403/404 can still produce a file that unzip then fails on (or worse: succeeds with wrong content).

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0336228 and f7ff655.

📒 Files selected for processing (12)
  • CHANGELOG.md (1 hunks)
  • Devel/Package.swift.prod (1 hunks)
  • Devel/podspec.prod (2 hunks)
  • Examples/SwiftUIWithPodExample/Podfile (1 hunks)
  • Package.swift (1 hunks)
  • README.md (3 hunks)
  • ReclaimInAppSdk.podspec (2 hunks)
  • Scripts/download_frameworks.sh (1 hunks)
  • Sources/ReclaimInAppSdk/Messages.swift (1 hunks)
  • Sources/ReclaimInAppSdk/ReclaimOverrides.swift (1 hunks)
  • Sources/ReclaimInAppSdk/ReclaimVerification.swift (2 hunks)
  • Sources/ReclaimInAppSdk/Resources/InAppSdk.version (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-05-08T01:28:18.864Z
Learnt from: predatorx7
Repo: reclaimprotocol/reclaim-inapp-ios-sdk PR: 3
File: Scripts/download_frameworks.sh:17-17
Timestamp: 2025-05-08T01:28:18.864Z
Learning: The version is intentionally hardcoded in Scripts/download_frameworks.sh because some users download and run this script directly without cloning the repository, so they won't have access to the version file at Sources/ReclaimInAppSdk/Resources/ReclaiminAppSdk.version.

Applied to files:

  • Scripts/download_frameworks.sh
  • Sources/ReclaimInAppSdk/Resources/InAppSdk.version
  • README.md
🪛 LanguageTool
CHANGELOG.md

[grammar] ~3-~3: Ensure spelling is correct
Context: ...turning incorrect values for fields not overriden * Update default feature flag values * Add...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🪛 SwiftLint (0.57.0)
Sources/ReclaimInAppSdk/Messages.swift

[Error] 487-487: Force casts should be avoided

(force_cast)


[Error] 488-488: Force casts should be avoided

(force_cast)


[Error] 489-489: Force casts should be avoided

(force_cast)


[Warning] 483-483: Initializing an optional variable with nil is redundant

(redundant_optional_initialization)

🔇 Additional comments (10)
Sources/ReclaimInAppSdk/Resources/InAppSdk.version (1)

1-1: Version bump looks consistent.
No concerns with updating the resource version string.

Examples/SwiftUIWithPodExample/Podfile (1)

8-10: Example Podfile version/tag alignment is correct.

README.md (1)

66-67: Docs updated correctly for 0.27.0 install snippets.

Also applies to: 130-131

Package.swift (1)

43-136: Same as prod manifest: verify every 0.27.0 checksum matches the published artifacts.
Also ensure Package.swift and Devel/Package.swift.prod remain identical for targets/checksums to avoid “works in prod but not locally” surprises.

Devel/Package.swift.prod (1)

43-136: All binary target URLs and checksums are correctly formatted and verified. The 19 targets spanning lines 43–136 all follow the correct Reclaim S3 pattern with valid SHA256 checksums. URLs are consistently structured as https://reclaim-inapp-sdk.s3.ap-south-1.amazonaws.com/ios/0.27.0/BinaryTargets/{name}.zip and each checksum is a properly formatted 64-character hex string. The code changes are sound and safe to merge.

ReclaimInAppSdk.podspec (1)

5-5: Verify that all 0.27.0 BinaryTargets URLs are published and accessible.
The podspec version (0.27.0) and xcframework URLs (lines 42–61) are correctly aligned. Since CocoaPods will fetch these external artifacts during pod install, confirm that all 18 binary URLs are reachable and the pod install succeeds. Additionally, note that the prepare_command uses curl -L without the -f flag and performs no checksum verification—consider adding integrity checks or fail-fast error handling for supply-chain robustness.

Sources/ReclaimInAppSdk/Messages.swift (1)

483-505: LGTM! Theme support added correctly to Pigeon-generated code.

The theme property has been properly added to ClientReclaimAppInfoOverride:

  • Declared as optional String? on line 483
  • Parsed from list index 3 on line 490
  • Included in constructor on lines 495-496
  • Serialized in toList() on line 504

Note: Static analysis warnings about force casts and redundant initialization can be safely ignored as this is autogenerated Pigeon code.

Sources/ReclaimInAppSdk/ReclaimVerification.swift (2)

681-682: LGTM! Theme correctly wired through setOverrides.

The theme property is properly passed from ReclaimOverrides.ReclaimAppInfo to ClientReclaimAppInfoOverride, maintaining the optional type and using safe optional chaining with appInfo?.theme.


651-659: Formatting improvement.

The line breaks improve readability of the ClientFeatureOverrides initialization by keeping parameter assignments on separate lines.

Devel/podspec.prod (1)

43-60: All required 0.27.0 artifacts are already published and accessible.

All 18 XCFramework URLs have been verified as available on S3. Pod installation should proceed without issues related to missing artifacts.

Comment on lines +1 to +6
## 0.27.0

* Fix feature flag overrides causing interruption with some login pages and returning incorrect values for fields not overriden
* Update default feature flag values
* Add potentialFailureReasonsLink in themes
* Add support for app theme override
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Fix changelog typo: “overriden” → “overridden”.

Suggested patch:

-* Fix feature flag overrides causing interruption with some login pages and returning incorrect values for fields not overriden
+* Fix feature flag overrides causing interruption with some login pages and returning incorrect values for fields not overridden
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## 0.27.0
* Fix feature flag overrides causing interruption with some login pages and returning incorrect values for fields not overriden
* Update default feature flag values
* Add potentialFailureReasonsLink in themes
* Add support for app theme override
## 0.27.0
* Fix feature flag overrides causing interruption with some login pages and returning incorrect values for fields not overridden
* Update default feature flag values
* Add potentialFailureReasonsLink in themes
* Add support for app theme override
🧰 Tools
🪛 LanguageTool

[grammar] ~3-~3: Ensure spelling is correct
Context: ...turning incorrect values for fields not overriden * Update default feature flag values * Add...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
In CHANGELOG.md around lines 1 to 6, there's a typo: the word "overriden" should
be corrected to "overridden"; update that occurrence in the release notes line
("Fix feature flag overrides causing interruption with some login pages and
returning incorrect values for fields not overriden") to use the correct
spelling "overridden".

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