Skip to content

Update package module#45

Merged
predatorx7 merged 2 commits into
mainfrom
pre-0.34.0
Apr 7, 2026
Merged

Update package module#45
predatorx7 merged 2 commits into
mainfrom
pre-0.34.0

Conversation

@predatorx7
Copy link
Copy Markdown
Collaborator

@predatorx7 predatorx7 commented Apr 6, 2026

Summary by CodeRabbit

  • New Features

    • Support for custom privacy/terms/failure‑reasons URLs
    • Session‑token authentication for AI service access
    • Native network support on iOS
    • Diagnostic log sanitization to redact sensitive data before upload
  • Bug Fixes

    • Fixed log upload trimming/order and cleared buffer after successful uploads
    • Improved webview trust/login detection and related event handling
  • Chores

    • Bumped SDK to 0.34.0 and updated dev dependencies and docs

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 6, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ predatorx7
❌ Mushaheed Syed


Mushaheed Syed seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 6, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a06787b0-2ab6-460a-a131-23c68c878835

📥 Commits

Reviewing files that changed from the base of the PR and between 6801345 and f147fdf.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (3)
  • expo-plugin/tsconfig.json
  • package.json
  • tsconfig.build.json
✅ Files skipped from review due to trivial changes (3)
  • expo-plugin/tsconfig.json
  • package.json
  • tsconfig.build.json

📝 Walkthrough

Walkthrough

This PR bumps the SDK to 0.34.0, adds three new feature-option URL fields (privacyPolicyUrl, termsOfServiceUrl, potentialFailureReasonsUrl) across TS/Android/iOS bindings, updates example defaults to "example", and makes several iOS/project build and toolchain config adjustments.

Changes

Cohort / File(s) Summary
Release & Versioning
CHANGELOG.md, InappRnSdk.podspec, android/build.gradle, package.json, samples/example_expo/package.json, samples/example_new_arch/package.json, documentation/install-no-framework.md, documentation/migration.md
Bumped SDK/package dependency versions to 0.34.0 and updated package devDependencies/tooling metadata.
Feature Options URL Fields
src/NativeInappRnSdk.ts, android/src/main/java/.../InappRnSdkModule.kt, ios/inapp_rn_sdk/Api.swift, ios/InappRnSdk.mm
Added privacyPolicyUrl, termsOfServiceUrl, and potentialFailureReasonsUrl to FeatureOptions and propagated through native setOverrides plumbing.
Sample & Example Defaults
samples/example_new_arch/src/App.overrides.tsx, samples/example_new_arch/src/App.tsx, user-workspace/src/App.overrides.tsx, user-workspace/src/App.tsx
Replaced hardcoded UUID defaults with the 'example' placeholder and added commented example entries for the new URL options.
Docs & Overrides Example
documentation/overrides.md
Replaced concrete provider UUID in provider URL examples with a placeholder example path.
iOS Project & Podfile
user-workspace/ios/InappRnSdkExample.xcodeproj/project.pbxproj, user-workspace/ios/InappRnSdkExample/Info.plist, user-workspace/ios/Podfile
Adjusted Xcode product bundle identifier and resource refs, added/removed Info.plist keys (added CADisableMinimumFrameDurationOnPhone, removed RCTNewArchEnabled), and added fmt header patching in Podfile post_install.
Build & Runtime Config
turbo.json, user-workspace/index.js
Added RCT_REMOVE_LEGACY_ARCH env to iOS build task; added DOM-aware AppRegistry.runApplication guard for browser execution.
TypeScript & Tooling Config
expo-plugin/tsconfig.json, tsconfig.build.json
Added types: ["node"] to expo-plugin tsconfig and expanded build exclusions for tests/mocks/fixtures.
Minor Documentation
documentation/install-no-framework.md, documentation/migration.md, documentation/overrides.md
Documentation examples updated to reflect version and example URL changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • Sajjad21990
  • ChinmayMhatre
  • kryptocodes
  • Karam19

Poem

🐇 Hops of code in springtime cheer,

New URLs now appear,
From iOS to Java and TS too,
"example" replaces what we knew,
A little rabbit shouts, "Release — woohoo!" 🥕

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Update package module' is vague and generic, failing to convey the specific nature of changes which involve a version bump from 0.29.0 to 0.34.0 across multiple platforms and the addition of feature options for privacy/terms/failure-reasons URLs. Replace with a more descriptive title such as 'Bump version to 0.34.0 and add feature option URLs' or 'Update SDK to 0.34.0 with privacy policy and terms of service URL overrides'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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 pre-0.34.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

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

🧹 Nitpick comments (3)
user-workspace/index.js (1)

7-11: Standard React Native Web bootstrap pattern looks good.

The browser environment guard using typeof document !== 'undefined' is the correct idiomatic approach for React Native Web support.

As an optional defensive improvement, you could add a null check for the root element to provide a clearer error message if the HTML is misconfigured:

🛡️ Optional: Add null safety for rootTag
 if (typeof document !== 'undefined') {
+    const rootTag = document.getElementById('root');
+    if (!rootTag) {
+        throw new Error('Root element with id "root" not found in DOM');
+    }
     AppRegistry.runApplication(appName, {
-        rootTag: document.getElementById('root'),
+        rootTag,
     });
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@user-workspace/index.js` around lines 7 - 11, Add a null check for the root
element returned by document.getElementById('root') before calling
AppRegistry.runApplication; if the element is null, log or throw a clear error
(e.g., using console.error or throw new Error) explaining the
missing/misconfigured root element so startup fails fast and with a helpful
message, then only call AppRegistry.runApplication(appName, { rootTag }) when
rootTag is non-null.
turbo.json (1)

39-39: Remove RCT_REMOVE_LEGACY_ARCH from build:ios.env in turbo.json — it's not consumed anywhere in the repository.

This variable appears only in turbo.json and is not used by any iOS build scripts, Podfiles, or CI workflows. Keeping it unnecessarily broadens Turbo's cache invalidation surface without providing any build impact.

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

In `@turbo.json` at line 39, Remove the unused environment variable entry
"RCT_REMOVE_LEGACY_ARCH" from the build:ios.env array in turbo.json; locate the
build:ios.env block in turbo.json and delete the "RCT_REMOVE_LEGACY_ARCH" item
so Turbo's cache invalidation surface is not broadened by an unused variable.
user-workspace/src/App.tsx (1)

32-32: Defaulting TEE mode to true overrides the SDK's auto default.

Line 32 initializes selectedTeeOptionValue with true, which forces useTeeOperator: true on every verification call. The SDK defaults to null (feature-flag driven), but this workspace explicitly enables TEE. To align with the SDK's auto mode, initialize with null:

♻️ Suggested change
-  const [selectedTeeOptionValue, setSelectedTeeOptionValue] = useState<boolean | null>(true);
+  const [selectedTeeOptionValue, setSelectedTeeOptionValue] = useState<boolean | null>(null);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@user-workspace/src/App.tsx` at line 32, selectedTeeOptionValue is being
initialized to true which forces useTeeOperator to true on every verification
call; change the useState initial value for selectedTeeOptionValue in App.tsx
from true to null so the SDK can use its feature-flag-driven default (update the
useState(...) call that declares selectedTeeOptionValue and
setSelectedTeeOptionValue).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CHANGELOG.md`:
- Line 8: Fix the typo in the changelog entry: update the line "* Fix an issue
where some websites where not trusted to run in webview" to use "were" instead
of "where" so it reads "* Fix an issue where some websites were not trusted to
run in webview".

In `@documentation/migration.md`:
- Line 5: Replace the repeated misspelling "overriden" with the correct
"overridden" in the migration documentation wherever it appears (e.g., in the
sentence containing "Make sure if you are using the latest versions of
`ReclaimInAppSdk` cocoapod if you have overriden this dependency in your
`Podfile`"), and update all other occurrences listed (lines referenced in the
review: 5, 11, 17, 23, 29, 35, 41, 49, 128, 167) so every instance of the token
"overriden" is changed to "overridden".

In `@samples/example_new_arch/src/App.overrides.tsx`:
- Line 39: The inline comment "// originally from \"example\"," is ambiguous;
replace it with an instruction-style comment that tells users what to change
(e.g., "Replace with your own provider ID" or "Set to your provider's ID, e.g.,
'my-provider'") so it's clear what value to supply; update the comment near the
same location in App.overrides.tsx to reference "provider ID" or the specific
identifier expected by the surrounding config/code.

In `@user-workspace/src/App.overrides.tsx`:
- Line 32: Prettier formatting errors exist on the changed lines — fix the
formatting for the state declaration and the JSX block around lines 141-143 so
they match the project's Prettier rules; update the const [inputText,
setInputText] = useState('example') line to follow the repo's spacing/quote
conventions and reformat the JSX using the component/prop names around the block
at lines 141-143 (where the offending JSX lives) or simply run the project's
Prettier/format command to automatically apply the correct spacing, line breaks,
and wrapping so lint/CI passes.

---

Nitpick comments:
In `@turbo.json`:
- Line 39: Remove the unused environment variable entry "RCT_REMOVE_LEGACY_ARCH"
from the build:ios.env array in turbo.json; locate the build:ios.env block in
turbo.json and delete the "RCT_REMOVE_LEGACY_ARCH" item so Turbo's cache
invalidation surface is not broadened by an unused variable.

In `@user-workspace/index.js`:
- Around line 7-11: Add a null check for the root element returned by
document.getElementById('root') before calling AppRegistry.runApplication; if
the element is null, log or throw a clear error (e.g., using console.error or
throw new Error) explaining the missing/misconfigured root element so startup
fails fast and with a helpful message, then only call
AppRegistry.runApplication(appName, { rootTag }) when rootTag is non-null.

In `@user-workspace/src/App.tsx`:
- Line 32: selectedTeeOptionValue is being initialized to true which forces
useTeeOperator to true on every verification call; change the useState initial
value for selectedTeeOptionValue in App.tsx from true to null so the SDK can use
its feature-flag-driven default (update the useState(...) call that declares
selectedTeeOptionValue and setSelectedTeeOptionValue).
🪄 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

Run ID: 7d7f9028-2e35-4307-a98a-2ec90bf9e8d0

📥 Commits

Reviewing files that changed from the base of the PR and between 78052f2 and 6801345.

⛔ Files ignored due to path filters (2)
  • user-workspace/ios/Podfile.lock is excluded by !**/*.lock
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (22)
  • CHANGELOG.md
  • InappRnSdk.podspec
  • android/build.gradle
  • android/src/main/java/com/reclaimprotocol/inapprnsdk/InappRnSdkModule.kt
  • documentation/install-no-framework.md
  • documentation/migration.md
  • documentation/overrides.md
  • ios/InappRnSdk.mm
  • ios/inapp_rn_sdk/Api.swift
  • package.json
  • samples/example_expo/package.json
  • samples/example_new_arch/package.json
  • samples/example_new_arch/src/App.overrides.tsx
  • samples/example_new_arch/src/App.tsx
  • src/NativeInappRnSdk.ts
  • turbo.json
  • user-workspace/index.js
  • user-workspace/ios/InappRnSdkExample.xcodeproj/project.pbxproj
  • user-workspace/ios/InappRnSdkExample/Info.plist
  • user-workspace/ios/Podfile
  • user-workspace/src/App.overrides.tsx
  • user-workspace/src/App.tsx

Comment thread CHANGELOG.md
* Update [internal] dependencies
* Update [internal] tests
* Update webview provider
* Fix an issue where some websites where not trusted to run in webview
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 | 🟡 Minor

Typo: "where" should be "were".

Minor grammatical error in the changelog entry.

📝 Proposed fix
-* Fix an issue where some websites where not trusted to run in webview
+* Fix an issue where some websites were not trusted to run in webview
📝 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
* Fix an issue where some websites where not trusted to run in webview
* Fix an issue where some websites were not trusted to run in webview
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CHANGELOG.md` at line 8, Fix the typo in the changelog entry: update the line
"* Fix an issue where some websites where not trusted to run in webview" to use
"were" instead of "where" so it reads "* Fix an issue where some websites were
not trusted to run in webview".

## 0.15.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.29.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.34.0](https://cocoapods.org/pods/ReclaimInAppSdk).
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 | 🟡 Minor

Fix repeated typo in migration docs (overridenoverridden).

The same spelling issue appears on Line 5, Line 11, Line 17, Line 23, Line 29, Line 35, Line 41, Line 49, Line 128, and Line 167.

Also applies to: 11-11, 17-17, 23-23, 29-29, 35-35, 41-41, 49-49, 128-128, 167-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)

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

In `@documentation/migration.md` at line 5, Replace the repeated misspelling
"overriden" with the correct "overridden" in the migration documentation
wherever it appears (e.g., in the sentence containing "Make sure if you are
using the latest versions of `ReclaimInAppSdk` cocoapod if you have overriden
this dependency in your `Podfile`"), and update all other occurrences listed
(lines referenced in the review: 5, 11, 17, 23, 29, 35, 41, 49, 128, 167) so
every instance of the token "overriden" is changed to "overridden".

return JSON.stringify({
"id": "669eca16d7e0758c94dfc03f",
// originally from "6d3f6753-7ee6-49ee-a545-62f1b1822ae5",
// originally from "example",
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 | 🟡 Minor

Clarify the inline comment to avoid confusion.

On Line 39, // originally from "example", is ambiguous and doesn’t guide users on what to do. Prefer an instruction-style comment (e.g., replace with your own provider ID).

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

In `@samples/example_new_arch/src/App.overrides.tsx` at line 39, The inline
comment "// originally from \"example\"," is ambiguous; replace it with an
instruction-style comment that tells users what to change (e.g., "Replace with
your own provider ID" or "Set to your provider's ID, e.g., 'my-provider'") so
it's clear what value to supply; update the comment near the same location in
App.overrides.tsx to reference "provider ID" or the specific identifier expected
by the surrounding config/code.

export default function App() {
const [verificationMethod, setVerificationMethod] = useState<VerificationMode>('providerId');
const [inputText, setInputText] = useState('6d3f6753-7ee6-49ee-a545-62f1b1822ae5');
const [inputText, setInputText] = useState('example');
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 | 🟡 Minor

Fix prettier violations on changed lines to prevent lint failure.

Line 32 and Lines 141-143 are currently failing formatting checks from static analysis.

Proposed formatting fix
-    const [inputText, setInputText] = useState('example');  
+    const [inputText, setInputText] = useState('example');

-                    // privacyPolicyUrl: 'https://reclaimprotocol.org/privacy-policy',
-                    // termsOfServiceUrl: 'https://reclaimprotocol.org/terms-of-service',
-                    // potentialFailureReasonsUrl: 'https://reclaimprotocol.org/potential-failure-reasons',
+            // privacyPolicyUrl: 'https://reclaimprotocol.org/privacy-policy',
+            // termsOfServiceUrl: 'https://reclaimprotocol.org/terms-of-service',
+            // potentialFailureReasonsUrl: 'https://reclaimprotocol.org/potential-failure-reasons',

Also applies to: 141-143

🧰 Tools
🪛 ESLint

[error] 32-32: Delete ··

(prettier/prettier)

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

In `@user-workspace/src/App.overrides.tsx` at line 32, Prettier formatting errors
exist on the changed lines — fix the formatting for the state declaration and
the JSX block around lines 141-143 so they match the project's Prettier rules;
update the const [inputText, setInputText] = useState('example') line to follow
the repo's spacing/quote conventions and reformat the JSX using the
component/prop names around the block at lines 141-143 (where the offending JSX
lives) or simply run the project's Prettier/format command to automatically
apply the correct spacing, line breaks, and wrapping so lint/CI passes.

@promptless
Copy link
Copy Markdown

promptless Bot commented Apr 6, 2026

Promptless prepared a documentation update related to this change.

Triggered by PR #45

Added documentation for the new featureOptions URL overrides (privacyPolicyUrl, termsOfServiceUrl, potentialFailureReasonsUrl) that allow developers to customize legal and help URLs displayed during the verification experience.

Review at https://app.gopromptless.ai/suggestions/4e8fde15-7c3a-4074-b53f-4e6c7a96d632

@predatorx7 predatorx7 merged commit d24c072 into main Apr 7, 2026
4 of 6 checks passed
@predatorx7 predatorx7 deleted the pre-0.34.0 branch April 7, 2026 06:18
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.

3 participants