Conversation
WalkthroughBumps SDK versions to 0.25.0 and expands public APIs with TEE/MPC-related flags, locale, and multiple timeout/interceptor fields; updates native iOS/Android bridges, TypeScript interfaces, samples, docs, and changelog. Minor project file cleanups and dependency/version string updates included. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (8)
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. Comment |
|
Need to update feature flag overrides, and verification options |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (3)
documentation/install-no-framework.md (1)
125-139: Helpful troubleshooting addition for XCode 26+.The new section provides clear guidance for iOS performance issues. Minor suggestion: Line 139 is missing a period at the end.
-7. Try running the project again on a physical iOS device +7. Try running the project again on a physical iOS device.documentation/install-expo.md (1)
92-106: Troubleshooting section mirrors the non-framework documentation.Same minor issue: Line 106 is missing a period at the end of the sentence.
-7. Try running the project again on a physical iOS device +7. Try running the project again on a physical iOS device.src/NativeInappRnSdk.ts (1)
368-405: Document and double‑check strictness of new VerificationOptions flags
canUseAttestorAuthenticationRequestis a new required boolean on a public interface but has no JSDoc, and its default behavior isn’t obvious. That makes it hard for SDK consumers to know what value to pass and what changes when upgrading.I’d suggest:
- Add a short doc comment (what “attestor authentication request” is, when to set true/false, and the default if omitted on native side).
- Confirm you really want this to be required; if native code has a sensible default, consider making it optional for smoother upgrades:
- canUseAttestorAuthenticationRequest: boolean; + canUseAttestorAuthenticationRequest?: boolean;The
localeanduseTeeOperatordocs look good; if possible, briefly mention expectedlocaleformat (e.g."en-US") and what happens when it’snull/omitted.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
user-workspace/ios/Podfile.lockis excluded by!**/*.lock
📒 Files selected for processing (15)
CHANGELOG.md(1 hunks)InappRnSdk.podspec(1 hunks)README.md(1 hunks)android/build.gradle(1 hunks)documentation/install-expo.md(1 hunks)documentation/install-no-framework.md(3 hunks)documentation/migration.md(3 hunks)ios/InappRnSdk.mm(5 hunks)ios/inapp_rn_sdk/Api.swift(7 hunks)package.json(1 hunks)samples/example_expo/package.json(1 hunks)samples/example_new_arch/package.json(1 hunks)src/NativeInappRnSdk.ts(3 hunks)src/index.tsx(3 hunks)user-workspace/ios/InappRnSdkExample.xcodeproj/project.pbxproj(0 hunks)
💤 Files with no reviewable changes (1)
- user-workspace/ios/InappRnSdkExample.xcodeproj/project.pbxproj
🧰 Additional context used
🪛 LanguageTool
documentation/migration.md
[grammar] ~5-~5: Ensure spelling is correct
Context: ... ReclaimInAppSdk cocoapod if you have overriden this dependency in your Podfile. Late...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~11-~11: Ensure spelling is correct
Context: ... ReclaimInAppSdk cocoapod if you have overriden this dependency in your Podfile. Late...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~17-~17: Ensure spelling is correct
Context: ... ReclaimInAppSdk cocoapod if you have overriden this dependency in your Podfile. Late...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~23-~23: Ensure spelling is correct
Context: ... ReclaimInAppSdk cocoapod if you have overriden this dependency in your Podfile. Late...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~29-~29: Ensure spelling is correct
Context: ... ReclaimInAppSdk cocoapod if you have overriden this dependency in your Podfile. Late...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~35-~35: Ensure spelling is correct
Context: ... ReclaimInAppSdk cocoapod if you have overriden this dependency in your Podfile. Late...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~41-~41: Ensure spelling is correct
Context: ... ReclaimInAppSdk cocoapod if you have overriden this dependency in your Podfile. Late...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~49-~49: Ensure spelling is correct
Context: ... ReclaimInAppSdk cocoapod if you have overriden this dependency in your Podfile. Late...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~128-~128: Ensure spelling is correct
Context: ... ReclaimInAppSdk cocoapod if you have overriden this dependency in your Podfile. Late...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~167-~167: Ensure spelling is correct
Context: ... ReclaimInAppSdk cocoapod if you have overriden this dependency in your Podfile. Late...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
documentation/install-expo.md
[style] ~100-~100: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ent xcscheme in Xcode" width="500"> 4. Click on the Edit Scheme button. 5. Click...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~101-~101: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...Click on the Edit Scheme button. 5. Click on the Run tab. 6. Uncheck the **De...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
documentation/install-no-framework.md
[style] ~133-~133: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ent xcscheme in Xcode" width="500"> 4. Click on the Edit Scheme button. 5. Click...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~134-~134: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...Click on the Edit Scheme button. 5. Click on the Run tab. 6. Uncheck the **De...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
🪛 markdownlint-cli2 (0.18.1)
documentation/migration.md
7-7: Bare URL used
(MD034, no-bare-urls)
13-13: Bare URL used
(MD034, no-bare-urls)
19-19: Bare URL used
(MD034, no-bare-urls)
25-25: Bare URL used
(MD034, no-bare-urls)
31-31: Bare URL used
(MD034, no-bare-urls)
37-37: Bare URL used
(MD034, no-bare-urls)
43-43: Bare URL used
(MD034, no-bare-urls)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build-android
🔇 Additional comments (14)
package.json (1)
3-3: Version bump to 0.25.0 looks consistent.Root package version aligns with the 0.25.0 release notes and native dependency updates; no issues from this file.
android/build.gradle (1)
74-79: Aligns Android in-app SDK with 0.25.0; verify artifact availability.The dependency bump to
org.reclaimprotocol:inapp_sdk:0.25.0is consistent with the rest of the PR. Please just make sure this coordinate is published and that a clean Android build (including samples) passes against this version.samples/example_new_arch/package.json (1)
14-18: Sample dependency updated to ^0.25.0 as expected.The example app now tracks the 0.25.x line of
@reclaimprotocol/inapp-rn-sdk, matching the main package version; no further changes needed here.samples/example_expo/package.json (1)
45-45: Expo sample now targets SDK ^0.25.0.Dependency bump to
@reclaimprotocol/inapp-rn-sdk^0.25.0 is consistent with the rest of the repo and the 0.25.0 release.README.md (1)
123-128: Cronet embedded version bump – ensure it matches your tested setup.Updating the docs to use
implementation("org.chromium.net:cronet-embedded:141.7340.3")is fine and keeps guidance current for non‑Play‑Services devices. Please confirm that this exact Cronet version is what you’re using in your tested Android builds (especially on devices without Play Services) so users don’t hit version mismatches.InappRnSdk.podspec (1)
18-18: Podspec now depends on ReclaimInAppSdk ~> 0.25.0.This keeps the iOS CocoaPods dependency aligned with the 0.25.0 release of the RN SDK. Just ensure
ReclaimInAppSdk0.25.x is pushed and that a fullpod install+ iOS build succeeds before releasing.CHANGELOG.md (1)
1-8: 0.25.0 changelog entry is clear and matches the described feature set.The new bullets succinctly describe the 0.25.0 additions (locale/useTeeOperator options, TEE+MPC protocol support, app/deep links via
Reclaim.setAllowedAppLinks, improved error messages, andReclaim.updateUserAgent). The API names look consistent; no changes needed from a changelog perspective.documentation/install-no-framework.md (1)
154-160: Version references updated correctly.The CocoaPods dependency references have been consistently updated to
~> 0.25.0across all sections.Also applies to: 197-197
ios/InappRnSdk.mm (1)
407-450: New locale and useTeeOperator options properly integrated.The verification options handling for
localeanduseTeeOperatoris correctly implemented in both code paths (with and without attestor authentication request).ios/inapp_rn_sdk/Api.swift (3)
167-176: Swift correctly usesint64Valuefor timeout fields.The Swift implementation properly extracts timeout values as
int64Value, which aligns with the field type comments. This confirms the Objective-C++ bridge inInappRnSdk.mmhas the bug (usingnumberWithBoolinstead ofnumberWithDouble).
429-483: New feature options fields properly declared and initialized.The new timeout and configuration fields are correctly typed as
NSNumber?with appropriate comments indicating their expected numeric types.
725-774: Verification options extension is well-implemented.The
localeanduseTeeOperatorproperties are properly added with correct typing, andtoSdkOptions()correctly propagates these values to the SDK.src/index.tsx (2)
166-211: Well-documented new verification options.The
localeanduseTeeOperatoroptions are properly typed as optional with comprehensive JSDoc documentation explaining the TEE+MPC protocol behavior and default values.
680-681: Options correctly propagated to native module.The null coalescing (
?? null) ensures proper handling of undefined values when passing to the native layer.
| - Make sure if you are using the latest versions of `ReclaimInAppSdk` cocoapod if you have overriden this dependency in your `Podfile`. Latest version on [cocoapods.org is 0.25.0](https://cocoapods.org/pods/ReclaimInAppSdk). | ||
| - Run a `pod install --repo-update`. If this fails for reasons related to the `ReclaimInAppSdk`, try running `pod update ReclaimInAppSdk`. | ||
| - Refer: https://github.com/reclaimprotocol/reclaim-inapp-reactnative-sdk/blob/main/README.md#ios-setup | ||
|
|
||
| ## 0.12.0 | ||
|
|
||
| - Make sure if you are using the latest versions of `ReclaimInAppSdk` cocoapod if you have overriden this dependency in your `Podfile`. Latest version on [cocoapods.org is 0.24.0](https://cocoapods.org/pods/ReclaimInAppSdk). | ||
| - Make sure if you are using the latest versions of `ReclaimInAppSdk` cocoapod if you have overriden this dependency in your `Podfile`. Latest version on [cocoapods.org is 0.25.0](https://cocoapods.org/pods/ReclaimInAppSdk). | ||
| - Run a `pod install --repo-update`. If this fails for reasons related to the `ReclaimInAppSdk`, try running `pod update ReclaimInAppSdk`. | ||
| - Refer: https://github.com/reclaimprotocol/reclaim-inapp-reactnative-sdk/blob/main/README.md#ios-setup | ||
|
|
||
| ## 0.10.13 | ||
|
|
||
| - Make sure if you are using the latest versions of `ReclaimInAppSdk` cocoapod if you have overriden this dependency in your `Podfile`. Latest version on [cocoapods.org is 0.24.0](https://cocoapods.org/pods/ReclaimInAppSdk). | ||
| - Make sure if you are using the latest versions of `ReclaimInAppSdk` cocoapod if you have overriden this dependency in your `Podfile`. Latest version on [cocoapods.org is 0.25.0](https://cocoapods.org/pods/ReclaimInAppSdk). | ||
| - Run a `pod install --repo-update`. If this fails for reasons related to the `ReclaimInAppSdk`, try running `pod update ReclaimInAppSdk`. | ||
| - Refer: https://github.com/reclaimprotocol/reclaim-inapp-reactnative-sdk/blob/main/README.md#ios-setup | ||
|
|
||
| ## 0.9.2 | ||
|
|
||
| - Make sure if you are using the latest versions of `ReclaimInAppSdk` cocoapod if you have overriden this dependency in your `Podfile`. Latest version on [cocoapods.org is 0.24.0](https://cocoapods.org/pods/ReclaimInAppSdk). | ||
| - Make sure if you are using the latest versions of `ReclaimInAppSdk` cocoapod if you have overriden this dependency in your `Podfile`. Latest version on [cocoapods.org is 0.25.0](https://cocoapods.org/pods/ReclaimInAppSdk). | ||
| - Run a `pod install --repo-update`. If this fails for reasons related to the `ReclaimInAppSdk`, try running `pod update ReclaimInAppSdk`. | ||
| - Refer: https://github.com/reclaimprotocol/reclaim-inapp-reactnative-sdk/blob/main/README.md#ios-setup | ||
|
|
||
| ## 0.9.1 | ||
|
|
||
| - Make sure if you are using the latest versions of `ReclaimInAppSdk` cocoapod if you have overriden this dependency in your `Podfile`. Latest version on [cocoapods.org is 0.24.0](https://cocoapods.org/pods/ReclaimInAppSdk). | ||
| - Make sure if you are using the latest versions of `ReclaimInAppSdk` cocoapod if you have overriden this dependency in your `Podfile`. Latest version on [cocoapods.org is 0.25.0](https://cocoapods.org/pods/ReclaimInAppSdk). | ||
| - Run a `pod install --repo-update`. If this fails for reasons related to the `ReclaimInAppSdk`, try running `pod update ReclaimInAppSdk`. | ||
| - Refer: https://github.com/reclaimprotocol/reclaim-inapp-reactnative-sdk/blob/main/README.md#ios-setup | ||
|
|
||
| ## 0.9.0 | ||
|
|
||
| - Make sure if you are using the latest versions of `ReclaimInAppSdk` cocoapod if you have overriden this dependency in your `Podfile`. Latest version on [cocoapods.org is 0.24.0](https://cocoapods.org/pods/ReclaimInAppSdk). | ||
| - Make sure if you are using the latest versions of `ReclaimInAppSdk` cocoapod if you have overriden this dependency in your `Podfile`. Latest version on [cocoapods.org is 0.25.0](https://cocoapods.org/pods/ReclaimInAppSdk). | ||
| - Run a `pod install --repo-update`. If this fails for reasons related to the `ReclaimInAppSdk`, try running `pod update ReclaimInAppSdk`. | ||
| - Refer: https://github.com/reclaimprotocol/reclaim-inapp-reactnative-sdk/blob/main/README.md#ios-setup | ||
|
|
||
| ## 0.8.3 | ||
|
|
||
| - Make sure if you are using the latest versions of `ReclaimInAppSdk` cocoapod if you have overriden this dependency in your `Podfile`. Latest version on [cocoapods.org is 0.24.0](https://cocoapods.org/pods/ReclaimInAppSdk). | ||
| - Make sure if you are using the latest versions of `ReclaimInAppSdk` cocoapod if you have overriden this dependency in your `Podfile`. Latest version on [cocoapods.org is 0.25.0](https://cocoapods.org/pods/ReclaimInAppSdk). | ||
| - Run a `pod install --repo-update`. If this fails for reasons related to the `ReclaimInAppSdk`, try running `pod update ReclaimInAppSdk`. | ||
| - Refer: https://github.com/reclaimprotocol/reclaim-inapp-reactnative-sdk/blob/main/README.md#ios-setup | ||
|
|
||
| ## 0.7.3 | ||
|
|
||
| ### iOS | ||
|
|
||
| - Make sure if you are using the latest versions of `ReclaimInAppSdk` cocoapod if you have overriden this dependency in your `Podfile`. Latest version on [cocoapods.org is 0.24.0](https://cocoapods.org/pods/ReclaimInAppSdk). | ||
| - Make sure if you are using the latest versions of `ReclaimInAppSdk` cocoapod if you have overriden this dependency in your `Podfile`. Latest version on [cocoapods.org is 0.25.0](https://cocoapods.org/pods/ReclaimInAppSdk). |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cd /tmp && find . -name "migration.md" -type f 2>/dev/null | head -5Repository: reclaimprotocol/reclaim-inapp-reactnative-sdk
Length of output: 71
🏁 Script executed:
git ls-files | grep -i migration.mdRepository: reclaimprotocol/reclaim-inapp-reactnative-sdk
Length of output: 115
🏁 Script executed:
cat -n documentation/migration.md | head -200Repository: reclaimprotocol/reclaim-inapp-reactnative-sdk
Length of output: 10099
Clarify line 167 version guidance and fix recurring wording issues.
Line 167 presents a conflict: it recommends using the 0.2.0 version of ReclaimInAppSdk while simultaneously stating the latest version on CocoaPods is 0.25.0. Either keep the pinned 0.2.0 recommendation and remove the "Latest version…" clause, or align it with other sections by referencing only the latest version.
Additionally, fix these recurring issues across the file:
overriden→overriddencocoapod→CocoaPod(capitalization)- Simplify the phrasing from "Make sure if you are using the latest versions" to "Make sure you are using the latest version"
Suggested wording for consistency:
Make sure you are using the latest version of the ReclaimInAppSdk CocoaPod if you have overridden this dependency in your Podfile.
Applies to: lines 5, 11, 17, 23, 29, 35, 41, 49, 128, 167
🧰 Tools
🪛 LanguageTool
[grammar] ~5-~5: Ensure spelling is correct
Context: ... ReclaimInAppSdk cocoapod if you have overriden this dependency in your Podfile. Late...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~11-~11: Ensure spelling is correct
Context: ... ReclaimInAppSdk cocoapod if you have overriden this dependency in your Podfile. Late...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~17-~17: Ensure spelling is correct
Context: ... ReclaimInAppSdk cocoapod if you have overriden this dependency in your Podfile. Late...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~23-~23: Ensure spelling is correct
Context: ... ReclaimInAppSdk cocoapod if you have overriden this dependency in your Podfile. Late...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~29-~29: Ensure spelling is correct
Context: ... ReclaimInAppSdk cocoapod if you have overriden this dependency in your Podfile. Late...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~35-~35: Ensure spelling is correct
Context: ... ReclaimInAppSdk cocoapod if you have overriden this dependency in your Podfile. Late...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~41-~41: Ensure spelling is correct
Context: ... ReclaimInAppSdk cocoapod if you have overriden this dependency in your Podfile. Late...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~49-~49: Ensure spelling is correct
Context: ... ReclaimInAppSdk cocoapod if you have overriden this dependency in your Podfile. Late...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🪛 markdownlint-cli2 (0.18.1)
7-7: Bare URL used
(MD034, no-bare-urls)
13-13: Bare URL used
(MD034, no-bare-urls)
19-19: Bare URL used
(MD034, no-bare-urls)
25-25: Bare URL used
(MD034, no-bare-urls)
31-31: Bare URL used
(MD034, no-bare-urls)
37-37: Bare URL used
(MD034, no-bare-urls)
43-43: Bare URL used
(MD034, no-bare-urls)
🤖 Prompt for AI Agents
documentation/migration.md lines 5-49, 128, 167: The version guidance on line
167 conflicts (recommends pinned 0.2.0 while citing latest 0.25.0) and multiple
instances use incorrect wording/capitalization; update by either keeping the
pinned version and removing the "Latest version…" clause or aligning it to
reference only the latest version (consistent with other sections), and change
all occurrences listed to the suggested consistent sentence: "Make sure you are
using the latest version of the ReclaimInAppSdk CocoaPod if you have overridden
this dependency in your Podfile." also replace "overriden" with "overridden" and
"cocoapod" with "CocoaPod" across the listed lines.
| if (featureOptions.claimCreationTimeoutDurationInMins().has_value()) { | ||
| overridenFeatureOptions.claimCreationTimeoutDurationInMins = | ||
| [NSNumber numberWithBool:featureOptions.claimCreationTimeoutDurationInMins().value()]; | ||
| } | ||
| if (featureOptions.sessionNoActivityTimeoutDurationInMins().has_value()) { | ||
| overridenFeatureOptions.sessionNoActivityTimeoutDurationInMins = | ||
| [NSNumber numberWithBool:featureOptions.sessionNoActivityTimeoutDurationInMins().value()]; | ||
| } | ||
| if (featureOptions.aiProviderNoActivityTimeoutDurationInSecs().has_value()) { | ||
| overridenFeatureOptions.aiProviderNoActivityTimeoutDurationInSecs = | ||
| [NSNumber numberWithBool:featureOptions.aiProviderNoActivityTimeoutDurationInSecs().value()]; | ||
| } | ||
| if (featureOptions.pageLoadedCompletedDebounceTimeoutMs().has_value()) { | ||
| overridenFeatureOptions.pageLoadedCompletedDebounceTimeoutMs = | ||
| [NSNumber numberWithBool:featureOptions.pageLoadedCompletedDebounceTimeoutMs().value()]; | ||
| } | ||
| if (featureOptions.potentialLoginTimeoutS().has_value()) { | ||
| overridenFeatureOptions.potentialLoginTimeoutS = | ||
| [NSNumber numberWithBool:featureOptions.potentialLoginTimeoutS().value()]; | ||
| } | ||
| if (featureOptions.screenshotCaptureIntervalSeconds().has_value()) { | ||
| overridenFeatureOptions.screenshotCaptureIntervalSeconds = | ||
| [NSNumber numberWithBool:featureOptions.screenshotCaptureIntervalSeconds().value()]; | ||
| } |
There was a problem hiding this comment.
Critical: Using numberWithBool for numeric timeout values will corrupt data.
All timeout/duration fields are incorrectly using numberWithBool: instead of numberWithDouble:. This will convert any timeout value to 1 (for non-zero) or 0, completely losing the actual timeout configuration.
For example, setting claimCreationTimeoutDurationInMins to 30 will result in 1 being stored.
Apply this diff to fix the type conversions:
if (featureOptions.claimCreationTimeoutDurationInMins().has_value()) {
overridenFeatureOptions.claimCreationTimeoutDurationInMins =
- [NSNumber numberWithBool:featureOptions.claimCreationTimeoutDurationInMins().value()];
+ [NSNumber numberWithDouble:featureOptions.claimCreationTimeoutDurationInMins().value()];
}
if (featureOptions.sessionNoActivityTimeoutDurationInMins().has_value()) {
overridenFeatureOptions.sessionNoActivityTimeoutDurationInMins =
- [NSNumber numberWithBool:featureOptions.sessionNoActivityTimeoutDurationInMins().value()];
+ [NSNumber numberWithDouble:featureOptions.sessionNoActivityTimeoutDurationInMins().value()];
}
if (featureOptions.aiProviderNoActivityTimeoutDurationInSecs().has_value()) {
overridenFeatureOptions.aiProviderNoActivityTimeoutDurationInSecs =
- [NSNumber numberWithBool:featureOptions.aiProviderNoActivityTimeoutDurationInSecs().value()];
+ [NSNumber numberWithDouble:featureOptions.aiProviderNoActivityTimeoutDurationInSecs().value()];
}
if (featureOptions.pageLoadedCompletedDebounceTimeoutMs().has_value()) {
overridenFeatureOptions.pageLoadedCompletedDebounceTimeoutMs =
- [NSNumber numberWithBool:featureOptions.pageLoadedCompletedDebounceTimeoutMs().value()];
+ [NSNumber numberWithDouble:featureOptions.pageLoadedCompletedDebounceTimeoutMs().value()];
}
if (featureOptions.potentialLoginTimeoutS().has_value()) {
overridenFeatureOptions.potentialLoginTimeoutS =
- [NSNumber numberWithBool:featureOptions.potentialLoginTimeoutS().value()];
+ [NSNumber numberWithDouble:featureOptions.potentialLoginTimeoutS().value()];
}
if (featureOptions.screenshotCaptureIntervalSeconds().has_value()) {
overridenFeatureOptions.screenshotCaptureIntervalSeconds =
- [NSNumber numberWithBool:featureOptions.screenshotCaptureIntervalSeconds().value()];
+ [NSNumber numberWithDouble:featureOptions.screenshotCaptureIntervalSeconds().value()];
}📝 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.
| if (featureOptions.claimCreationTimeoutDurationInMins().has_value()) { | |
| overridenFeatureOptions.claimCreationTimeoutDurationInMins = | |
| [NSNumber numberWithBool:featureOptions.claimCreationTimeoutDurationInMins().value()]; | |
| } | |
| if (featureOptions.sessionNoActivityTimeoutDurationInMins().has_value()) { | |
| overridenFeatureOptions.sessionNoActivityTimeoutDurationInMins = | |
| [NSNumber numberWithBool:featureOptions.sessionNoActivityTimeoutDurationInMins().value()]; | |
| } | |
| if (featureOptions.aiProviderNoActivityTimeoutDurationInSecs().has_value()) { | |
| overridenFeatureOptions.aiProviderNoActivityTimeoutDurationInSecs = | |
| [NSNumber numberWithBool:featureOptions.aiProviderNoActivityTimeoutDurationInSecs().value()]; | |
| } | |
| if (featureOptions.pageLoadedCompletedDebounceTimeoutMs().has_value()) { | |
| overridenFeatureOptions.pageLoadedCompletedDebounceTimeoutMs = | |
| [NSNumber numberWithBool:featureOptions.pageLoadedCompletedDebounceTimeoutMs().value()]; | |
| } | |
| if (featureOptions.potentialLoginTimeoutS().has_value()) { | |
| overridenFeatureOptions.potentialLoginTimeoutS = | |
| [NSNumber numberWithBool:featureOptions.potentialLoginTimeoutS().value()]; | |
| } | |
| if (featureOptions.screenshotCaptureIntervalSeconds().has_value()) { | |
| overridenFeatureOptions.screenshotCaptureIntervalSeconds = | |
| [NSNumber numberWithBool:featureOptions.screenshotCaptureIntervalSeconds().value()]; | |
| } | |
| if (featureOptions.claimCreationTimeoutDurationInMins().has_value()) { | |
| overridenFeatureOptions.claimCreationTimeoutDurationInMins = | |
| [NSNumber numberWithDouble:featureOptions.claimCreationTimeoutDurationInMins().value()]; | |
| } | |
| if (featureOptions.sessionNoActivityTimeoutDurationInMins().has_value()) { | |
| overridenFeatureOptions.sessionNoActivityTimeoutDurationInMins = | |
| [NSNumber numberWithDouble:featureOptions.sessionNoActivityTimeoutDurationInMins().value()]; | |
| } | |
| if (featureOptions.aiProviderNoActivityTimeoutDurationInSecs().has_value()) { | |
| overridenFeatureOptions.aiProviderNoActivityTimeoutDurationInSecs = | |
| [NSNumber numberWithDouble:featureOptions.aiProviderNoActivityTimeoutDurationInSecs().value()]; | |
| } | |
| if (featureOptions.pageLoadedCompletedDebounceTimeoutMs().has_value()) { | |
| overridenFeatureOptions.pageLoadedCompletedDebounceTimeoutMs = | |
| [NSNumber numberWithDouble:featureOptions.pageLoadedCompletedDebounceTimeoutMs().value()]; | |
| } | |
| if (featureOptions.potentialLoginTimeoutS().has_value()) { | |
| overridenFeatureOptions.potentialLoginTimeoutS = | |
| [NSNumber numberWithDouble:featureOptions.potentialLoginTimeoutS().value()]; | |
| } | |
| if (featureOptions.screenshotCaptureIntervalSeconds().has_value()) { | |
| overridenFeatureOptions.screenshotCaptureIntervalSeconds = | |
| [NSNumber numberWithDouble:featureOptions.screenshotCaptureIntervalSeconds().value()]; | |
| } |
🤖 Prompt for AI Agents
In ios/InappRnSdk.mm around lines 257 to 280, the timeout/duration NSNumber
assignments incorrectly use numberWithBool:, which collapses numeric values to
0/1; replace numberWithBool: with numberWithDouble: (or the appropriate numeric
NSNumber constructor) and pass the featureOptions.*.value() as a double so the
actual timeout values (e.g., 30) are preserved for
overridenFeatureOptions.claimCreationTimeoutDurationInMins,
sessionNoActivityTimeoutDurationInMins,
aiProviderNoActivityTimeoutDurationInSecs, pageLoadedCompletedDebounceTimeoutMs,
potentialLoginTimeoutS, and screenshotCaptureIntervalSeconds.
|
|
||
| /** | ||
| * Whether to use TEE. | ||
| */ | ||
| useTEE?: boolean | null; | ||
|
|
||
| /** | ||
| * Interceptor options. | ||
| */ | ||
| interceptorOptions?: string | null; | ||
|
|
||
| claimCreationTimeoutDurationInMins: number | null; | ||
|
|
||
| sessionNoActivityTimeoutDurationInMins: number | null; | ||
|
|
||
| aiProviderNoActivityTimeoutDurationInSecs: number | null; | ||
|
|
||
| pageLoadedCompletedDebounceTimeoutMs: number | null; | ||
|
|
||
| potentialLoginTimeoutS: number | null; | ||
|
|
||
| screenshotCaptureIntervalSeconds: number | null; | ||
|
|
||
| /** | ||
| * Hosted TEE services Url that participate in Reclaim's TEE+MPC protocol | ||
| */ | ||
| teeUrls: string | null |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# Find and display the FeatureOptions interface definition
rg -A 100 "interface FeatureOptions" src/NativeInappRnSdk.ts | head -120Repository: reclaimprotocol/reclaim-inapp-reactnative-sdk
Length of output: 2366
Make new FeatureOptions fields optional to avoid breaking existing callers
All existing FeatureOptions fields are optional (have ?), but the newly added timeout/interval/URL fields are required. This breaks any TypeScript consumer that passes partial featureOptions overrides.
Keep them optional to maintain consistency:
- claimCreationTimeoutDurationInMins: number | null;
- sessionNoActivityTimeoutDurationInMins: number | null;
- aiProviderNoActivityTimeoutDurationInSecs: number | null;
- pageLoadedCompletedDebounceTimeoutMs: number | null;
- potentialLoginTimeoutS: number | null;
- screenshotCaptureIntervalSeconds: number | null;
- teeUrls: string | null
+ claimCreationTimeoutDurationInMins?: number | null;
+ sessionNoActivityTimeoutDurationInMins?: number | null;
+ aiProviderNoActivityTimeoutDurationInSecs?: number | null;
+ pageLoadedCompletedDebounceTimeoutMs?: number | null;
+ potentialLoginTimeoutS?: number | null;
+ screenshotCaptureIntervalSeconds?: number | null;
+ teeUrls?: string | null;Also add JSDoc to document units (mins/secs/ms) and default behavior (null => SDK default) for the new fields to match the existing ones.
📝 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.
| /** | |
| * Whether to use TEE. | |
| */ | |
| useTEE?: boolean | null; | |
| /** | |
| * Interceptor options. | |
| */ | |
| interceptorOptions?: string | null; | |
| claimCreationTimeoutDurationInMins: number | null; | |
| sessionNoActivityTimeoutDurationInMins: number | null; | |
| aiProviderNoActivityTimeoutDurationInSecs: number | null; | |
| pageLoadedCompletedDebounceTimeoutMs: number | null; | |
| potentialLoginTimeoutS: number | null; | |
| screenshotCaptureIntervalSeconds: number | null; | |
| /** | |
| * Hosted TEE services Url that participate in Reclaim's TEE+MPC protocol | |
| */ | |
| teeUrls: string | null | |
| /** | |
| * Whether to use TEE. | |
| */ | |
| useTEE?: boolean | null; | |
| /** | |
| * Interceptor options. | |
| */ | |
| interceptorOptions?: string | null; | |
| claimCreationTimeoutDurationInMins?: number | null; | |
| sessionNoActivityTimeoutDurationInMins?: number | null; | |
| aiProviderNoActivityTimeoutDurationInSecs?: number | null; | |
| pageLoadedCompletedDebounceTimeoutMs?: number | null; | |
| potentialLoginTimeoutS?: number | null; | |
| screenshotCaptureIntervalSeconds?: number | null; | |
| /** | |
| * Hosted TEE services Url that participate in Reclaim's TEE+MPC protocol | |
| */ | |
| teeUrls?: string | null; |
🤖 Prompt for AI Agents
In src/NativeInappRnSdk.ts around lines 190 to 216, the newly added
FeatureOptions fields (claimCreationTimeoutDurationInMins,
sessionNoActivityTimeoutDurationInMins,
aiProviderNoActivityTimeoutDurationInSecs, pageLoadedCompletedDebounceTimeoutMs,
potentialLoginTimeoutS, screenshotCaptureIntervalSeconds, teeUrls) are declared
as required and break callers that pass partial featureOptions; make each of
these fields optional by adding '?' to their declarations and add brief JSDoc
for each that states the unit (mins/secs/ms) and that null means "use SDK
default" to match the existing optional fields and documentation style.
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.