Skip to content

Release 19.0.0: network logs, dark / light mode and bridge fixes - #56

Merged
boehlerlukas merged 16 commits into
mainfrom
kai/auto-detect-host-app-dark-light--a815aa69
Sep 30, 2026
Merged

boehlerlukas merged 16 commits into
mainfrom
kai/auto-detect-host-app-dark-light--a815aa69

Conversation

@LucaB01

@LucaB01 LucaB01 commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Release 19.0.0 of the React Native SDK: network/console logs rework, dark / light mode and bridge fixes. Needs iOS and Android SDK 19.0.0 on CocoaPods / Maven Central first.

Changes

  • Network logs: on iOS the native SDK now records React Native's requests itself (the JS interceptor is no longer installed there); on Android the JS logger was reworked: fetch logged once, errors/aborts/timeouts recorded, redaction in JS, hand-off to native via attachNetworkLogs(JSONArray).
  • Dark / light mode: Gleap.setColorScheme('auto' | 'light' | 'dark', { lightBackgroundColor?, darkBackgroundColor? }). Only takes effect when "Adapt to dark / light mode" is on in the dashboard.
  • Android fixes: isUserIdentified, getIdentity, isOpened always resolve; silent crash report severity; configLoaded / initialized reach JS after a JS reload or a native init (the network logger starts again).
  • iOS fixes: feedbackSendingFailed delivered, notification count type, shake/screenshot hooks registered once per process.
  • Example: metro.config.js resolves react / react-native from the example only (the bundle contained two React Native copies, so native events never reached the SDK).
  • Version 19.0.0 (native iOS / Android 19.0.0).

Tested

  • yarn typescript, yarn test (26 passing; the example's own App-test failure is pre-existing).
  • Example app on the iOS simulator and the Android emulator against the local 19.0.0 SDKs: a ticket after fetch / XMLHttpRequest requests has every request exactly once with the filters applied, also after a JS reload and with a native init first.

Supersedes #55.

🤖 Generated with Claude Code

boehlerlukas and others added 12 commits September 26, 2026 15:09
Session 6ab7c16def8693c5a815aa69 · run on MacBook-Pro-von-Lukas
…ogger on Android)

iOS: the native SDK (18.2.0) logs every NSURLSession request, React
Native's networking included, so the JS interceptor is no longer
installed there. startNetworkLogging / stopNetworkLogging call the new
startNetworkRecording / stopNetworkRecording bridge methods.

Android: the JS interceptor was rewritten.
- React Native's fetch is built on XMLHttpRequest. XHRs opened while
  the original fetch runs synchronously are left to the fetch hook, so
  a fetch is logged once (its XHR twin logged "<content_too_large>").
- setRequestHeader always forwards to the native method (a repeated
  header name used to be dropped); repeated values are joined with ", ".
- Entries follow the shared shape: ISO start date, uppercase method,
  response headers, failures / aborts / timeouts with errorText and no
  status, bodies capped at 150 KB, streaming and binary bodies skipped,
  FormData / URLSearchParams / Blob payloads normalised.
- The full redacted list is pushed at most every 500 ms after a request
  finished, and right before a silent crash report. Before, every
  open / send / load serialised all bodies over the bridge.
- New networkLogSanitizer: blacklist (default gleap.io / gleap.ai),
  prop removal (headers, JSON keys at any depth and dotted paths, form
  fields, query params; case-insensitive) and credential header masking
  before the hand-off, from the local lists and the remote config.
- The bridge passes the JSON array to Gleap.attachNetworkLogs(JSONArray)
  as is. The old Networklog conversion threw for PATCH / HEAD /
  lowercase methods and in-flight entries and dropped the whole batch.

Both: stopNetworkLogging() wins over the dashboard setting, and
startNetworkLogging() after a stop resumes logging.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ngth

Chunked responses have no Content-Length, so the logger read the whole body
into a JS string before capping it at 150 KB. React Native's fetch keeps the
downloaded body in a Blob; read a 150 KB slice of it instead and mark the
truncation with the full size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…unread count type

The bridge implemented `feedbackSendingFailed` without the error dictionary, but
GleapDelegate declares `feedbackSendingFailed:`, so the SDK never called it and the
app never heard about a failed report. `notificationCountUpdated:` was declared with
NSInteger while the protocol passes an `int`, so the upper 32 bits of the count were
undefined.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
configLoaded runs again when the JS context reloads (dev reload, OTA update) and
initializes Gleap again. Each call added another screenshot observer and, in release
builds, swapped UIWindow's motionEnded:withEvent: again, which switched the shake
handling back off on every second reload. The hooks are now set up once per process
and don't depend on the module instance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tect-host-app-dark-light--a815aa69

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ample bundles one React Native

- isUserIdentified, getIdentity and isOpened always resolve on Android.
- Silent crash report severity compared with equals.
- configLoaded / initialized reach JS after a JS reload or a native init (cached and replayed, handled once per JS context).
- example/metro.config.js: resolve react and react-native from the example only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
boehlerlukas and others added 4 commits September 30, 2026 11:28
Without an import or export the file is a global script, and its declarations
clash with the copy bob emits to lib/typescript (TS2300/TS2451 in CI's typecheck).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CocoaPods trunk is read-only from 2026-12-02, so the podspec now adds the
Gleap-iOS-SDK Swift package (product Gleap, exact version 19.0.0) through
React Native's spm_dependency (RN 0.75+) instead of depending on the Gleap pod.
Without spm_dependency (RN < 0.75, pod lib lint) it falls back to the Gleap pod
and warns. The iOS version pin lives in one line: gleap_ios_sdk_version.

The Swift package exposes its headers as the module Gleap (no Gleap/ folder),
so the bridge imports <Gleap/Gleap.h> only when the pod is present and
@import Gleap otherwise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
README: iOS 15+, React Native 0.75+ (Expo SDK 52+), how pod install adds the
Swift package, the static-linking warning and the pre-0.75 fallback.
CHANGELOG: 19.0.0 entry. CONTRIBUTING: the iOS pin is gleap_ios_sdk_version in
the podspec and needs the Gleap-iOS-SDK tag before the wrapper is tagged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@boehlerlukas
boehlerlukas merged commit 100d21a into main Sep 30, 2026
1 check 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