Skip to content

Update inapp sdk module to 0.29.0#44

Merged
predatorx7 merged 1 commit into
mainfrom
pre-0.29.0
Jan 26, 2026
Merged

Update inapp sdk module to 0.29.0#44
predatorx7 merged 1 commit into
mainfrom
pre-0.29.0

Conversation

@predatorx7
Copy link
Copy Markdown
Collaborator

@predatorx7 predatorx7 commented Jan 20, 2026

Summary by CodeRabbit

  • New Features

    • Added theme customization support for app configuration.
    • Introduced log parsing and analysis with structured event types and severity levels.
    • Added TEE (Trusted Execution Environment) mode selection with Auto, Enabled, and Disabled options.
  • Improvements

    • Made certain verification options optional for greater flexibility.
  • Chores

    • Updated dependencies to version 0.29.0 across all platforms.

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

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 20, 2026

📝 Walkthrough

Walkthrough

This PR upgrades the SDK from version 0.25.x to 0.29.0 and introduces theme customization support across iOS, Android, and TypeScript interfaces. It adds logging infrastructure with new LogLevel and LogEventType enums, plus a parseLog method for structured log processing. The example app demonstrates TEE mode selection and log consumer integration.

Changes

Cohort / File(s) Summary
Version Bump & Documentation
CHANGELOG.md, package.json, InappRnSdk.podspec, android/build.gradle, documentation/install-no-framework.md, documentation/migration.md, samples/example_expo/package.json, samples/example_new_arch/package.json
Version updated from 0.25.x to 0.29.0 across package manifests, native dependency declarations, and documentation. All version strings reflect the new release consistently.
Theme Support - Native Implementations
ios/InappRnSdk.mm, ios/inapp_rn_sdk/Api.swift, android/src/main/java/com/reclaimprotocol/inapprnsdk/InappRnSdkModule.kt
Theme parameter added to ReclaimAppInfo initialization across platforms. iOS Objective-C method signature updated to include theme:(NSString *_Nullable)theme, Swift Api.swift adds theme: String? property and initializer parameter, Android Kotlin retrieves and passes theme from appInfo.
TypeScript/React Native Interface
src/NativeInappRnSdk.ts
Added optional `theme?: string
Logging Infrastructure & Verification Updates
src/index.tsx
Introduces new public logging types: LogLevel enum (SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST), LogEventType enum (extensive event list), and LogEntry type. Adds parseLog(log: string) method to ReclaimVerification. Makes canDeleteCookiesBeforeVerificationStarts and fetchAttestorAuthenticationRequest optional in VerificationOptions. Adds timestamp conversion helper fromTimeStampToDate(). Changes onLogs handler parameter from String to string.
Example App Integration
user-workspace/src/App.tsx
Adds TEE mode dropdown UI with Auto/Enabled/Disabled options. Integrates TEE mode selection into verification flow via useTeeOperator option. Configures logConsumer in Overrides to consume and log structured events using capabilityAccessToken. Extends state management for new UI controls without affecting existing verification logic.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant App as App/ReclaimVerification
    participant Parser as parseLog()
    participant Converter as fromTimeStampToDate()
    participant LogEntry as LogEntry Object

    User->>App: Receives raw log JSON string
    App->>Parser: parseLog(logJsonString)
    Parser->>Parser: Parse JSON structure
    alt timestamp present
        Parser->>Converter: fromTimeStampToDate(nanosecond ts)
        Converter->>Converter: Convert nanoseconds to Date
        Converter-->>Parser: Date object
    end
    Parser->>LogEntry: Construct LogEntry with<br/>logLine, ts, datetime,<br/>type, sessionId, logLevel,<br/>eventType
    LogEntry-->>App: Structured LogEntry
    App-->>User: Return parsed log data
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested reviewers

  • ChinmayMhatre
  • Sajjad21990
  • kryptocodes

Poem

🐰 A hop, skip, and version bump to 0.29!
Theme colors dance, logs parse so clean,
TEE modes chosen with dropdown dreams,
Cross-platform harmony, oh what a scene!
The rabbit approves this feat so keen! 🌟

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
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.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the primary objective of the PR, which is to bump the inapp SDK module version to 0.29.0 across multiple files.

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

✨ Finishing touches
  • 📝 Generate docstrings

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: 3

🤖 Fix all issues with AI agents
In `@documentation/migration.md`:
- Line 5: Fix the spelling of "overriden" to "overridden" throughout the
migration.md document; search for the misspelling (e.g., in lines referencing
the ReclaimInAppSdk cocoapod) and replace each occurrence (including the
instances noted in the comment) so all instances use the correct double‑d
"overridden".
- Line 167: The sentence in migration.md mixes a specific old version with the
latest release and is inconsistent; update the line referencing ReclaimInAppSdk
so it either uses "an older version" (instead of the incorrect "0.2.0") or
consistently names the old example and the latest release; for example, change
the text around the symbol "ReclaimInAppSdk" to read: "Make sure if you are
using an older version of the ReclaimInAppSdk cocoapod (e.g., 0.2.0) or have
overridden this dependency in your Podfile, update it — the latest version on
cocoapods.org is 0.29.0." Ensure the change replaces the literal "0.2.0" or
rephrases to match other migration sections that use "latest versions."

In `@user-workspace/src/App.tsx`:
- Around line 411-415: The onPress handler for selecting a TEE option is closing
the wrong dropdown and clearing the provider input: replace the call to
setShowDropdown(false) with setShowTeeDropdown(false) and remove the
setInputText('') call so selecting a TEE does not wipe the provider ID/URL;
update the handler that sets setSelectedTeeOptionValue(option.value) accordingly
(keep that call) so only the TEE dropdown is closed and the input remains
unchanged.
🧹 Nitpick comments (3)
src/index.tsx (1)

915-923: Wrap JSON.parse in try/catch to handle malformed log strings.

If log contains invalid JSON, JSON.parse will throw a SyntaxError. Since this is a public API that processes external log data, adding error handling would improve robustness.

♻️ Suggested improvement
   override parseLog(
     log: string
   ): ReclaimVerification.LogEntry {
-    let data = JSON.parse(log) as ReclaimVerification.LogEntry;
-    if (data.ts) {
-      data.datetime = this.fromTimeStampToDate(data.ts);
+    try {
+      let data = JSON.parse(log) as ReclaimVerification.LogEntry;
+      if (data.ts) {
+        data.datetime = this.fromTimeStampToDate(data.ts);
+      }
+      return data;
+    } catch (e) {
+      // Return a minimal LogEntry on parse failure
+      return {
+        logLine: log,
+        ts: '',
+        datetime: new Date(),
+        type: 'unknown',
+        sessionId: 'unknown',
+        providerId: '',
+        appId: '',
+        logLevel: 'WARNING',
+      };
     }
-    return data;
   }
ios/inapp_rn_sdk/Api.swift (1)

206-213: Verify override semantics for isRecurring/theme defaults.

isRecurring now defaults to false when nil, and theme is passed through verbatim. If the SDK treats “unset” differently from explicit values, this could unintentionally override defaults. Consider normalizing empty themes and confirm whether nil should remain unset for isRecurring.

♻️ Optional normalization for empty theme
-      appInfoOverrides = .init(
-        appName: appInfo.appName,
-        appImageUrl: appInfo.appImageUrl,
-        isRecurring: appInfo.isRecurring?.boolValue ?? false,
-        theme: appInfo.theme
-      )
+      let theme = (appInfo.theme?.isEmpty == false) ? appInfo.theme : nil
+      appInfoOverrides = .init(
+        appName: appInfo.appName,
+        appImageUrl: appInfo.appImageUrl,
+        isRecurring: appInfo.isRecurring?.boolValue ?? false,
+        theme: theme
+      )
ios/InappRnSdk.mm (1)

392-400: Normalize empty theme to nil before bridging.

If the SDK expects “unset” instead of an empty string, guard against empty theme values to avoid overriding defaults.

♻️ Suggested normalization
-    NSString *_Nullable theme = nil;
-    if (appInfo.theme() != nil) {
-      theme = appInfo.theme();
-    }
+    NSString *_Nullable theme = nil;
+    if (appInfo.theme() != nil && appInfo.theme().length > 0) {
+      theme = appInfo.theme();
+    }

## 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.25.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.29.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 spelling: "overriden" → "overridden"

This typo appears throughout the migration document. The correct spelling is "overridden" (double 'd').

Suggested fix
-- 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 overridden this dependency in your `Podfile`. Latest version on [cocoapods.org is 0.29.0](https://cocoapods.org/pods/ReclaimInAppSdk).

Apply the same fix to lines 11, 17, 23, 29, 35, 41, 49, 128, and 167.

📝 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
- 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 overridden this dependency in your `Podfile`. Latest version on [cocoapods.org is 0.29.0](https://cocoapods.org/pods/ReclaimInAppSdk).
🧰 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
In `@documentation/migration.md` at line 5, Fix the spelling of "overriden" to
"overridden" throughout the migration.md document; search for the misspelling
(e.g., in lines referencing the ReclaimInAppSdk cocoapod) and replace each
occurrence (including the instances noted in the comment) so all instances use
the correct double‑d "overridden".

### iOS

- Make sure if you are using the `0.2.0` version 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).
- Make sure if you are using the `0.2.0` version 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).
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

Inconsistent version reference

This line mentions "if you are using the 0.2.0 version" but then states the latest version is 0.29.0. The sentence structure appears inconsistent with other migration sections that say "latest versions" instead of a specific old version.

Suggested fix
-- Make sure if you are using the `0.2.0` version 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 overridden this dependency in your `Podfile`. Latest version on [cocoapods.org is 0.29.0](https://cocoapods.org/pods/ReclaimInAppSdk).
📝 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
- Make sure if you are using the `0.2.0` version 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 overridden this dependency in your `Podfile`. Latest version on [cocoapods.org is 0.29.0](https://cocoapods.org/pods/ReclaimInAppSdk).
🧰 Tools
🪛 LanguageTool

[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)

🤖 Prompt for AI Agents
In `@documentation/migration.md` at line 167, The sentence in migration.md mixes a
specific old version with the latest release and is inconsistent; update the
line referencing ReclaimInAppSdk so it either uses "an older version" (instead
of the incorrect "0.2.0") or consistently names the old example and the latest
release; for example, change the text around the symbol "ReclaimInAppSdk" to
read: "Make sure if you are using an older version of the ReclaimInAppSdk
cocoapod (e.g., 0.2.0) or have overridden this dependency in your Podfile,
update it — the latest version on cocoapods.org is 0.29.0." Ensure the change
replaces the literal "0.2.0" or rephrases to match other migration sections that
use "latest versions."

Comment on lines +411 to +415
onPress={() => {
setSelectedTeeOptionValue(option.value);
setInputText('');
setShowDropdown(false);
}}
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

Bug: Wrong dropdown is closed and input is unnecessarily cleared when selecting TEE mode.

When a TEE option is selected:

  1. setShowDropdown(false) is called instead of setShowTeeDropdown(false) - this closes the wrong modal
  2. setInputText('') clears the provider ID/URL input, which is undesirable as TEE mode selection is independent of the verification input

Compare with the verification mode dropdown handler at lines 287-291 which correctly clears input (since changing verification mode invalidates the previous input format).

🐛 Proposed fix
                     onPress={() => {
                       setSelectedTeeOptionValue(option.value);
-                      setInputText('');
-                      setShowDropdown(false);
+                      setShowTeeDropdown(false);
                     }}
📝 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
onPress={() => {
setSelectedTeeOptionValue(option.value);
setInputText('');
setShowDropdown(false);
}}
onPress={() => {
setSelectedTeeOptionValue(option.value);
setShowTeeDropdown(false);
}}
🤖 Prompt for AI Agents
In `@user-workspace/src/App.tsx` around lines 411 - 415, The onPress handler for
selecting a TEE option is closing the wrong dropdown and clearing the provider
input: replace the call to setShowDropdown(false) with setShowTeeDropdown(false)
and remove the setInputText('') call so selecting a TEE does not wipe the
provider ID/URL; update the handler that sets
setSelectedTeeOptionValue(option.value) accordingly (keep that call) so only the
TEE dropdown is closed and the input remains unchanged.

@predatorx7 predatorx7 merged commit 78052f2 into main Jan 26, 2026
4 of 6 checks passed
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