diff --git a/cspell.json b/cspell.json index 678585f..2cd046e 100644 --- a/cspell.json +++ b/cspell.json @@ -2,6 +2,16 @@ "version": "0.2", "language": "en", "words": [ + "consteval", + "prebuild", + "destroot", + "rootproject", + "Slurper", + "libreactnative", + "libhermesvm", + "libc", + "hermesc", + "udpsocket", "DCIM", "backgrounding", "debuggerd", @@ -72,6 +82,8 @@ "androidx", "Bugsee", "bugsee", + "creditcard", + "cardnumber", "symbolicate", "symbolication", "symbolicated", @@ -231,6 +243,18 @@ "sandboxing", "libil", "unbreak", - "Podspec" + "Podspec", + "javascriptcore", + "reactnative", + "slashy", + "avplayer", + "ABRT", + "SEGV", + "oslog", + "swipeable", + "collapsable", + "RGBA", + "RRGGBB", + "RRGGBBAA" ] } \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 0e5843d..b1255d5 100644 --- a/docs/index.md +++ b/docs/index.md @@ -12,7 +12,7 @@ Using Bugsee on mobile devices requires installation of Bugsee lightweight SDK: * [Installing iOS SDK](/sdk/ios/installation/) * [Installing Android SDK](/sdk/android/installation/) * [Installing Cordova SDK](/sdk/cordova/installation/) -* [Installing React Native SDK](/sdk/react_native/installation/) +* [Installing React Native SDK](/sdk/react_native/v6/installation/) * [Installing Flutter SDK](/sdk/flutter/installation/) * [Installing Unity SDK](/sdk/unity/installation/) * [Installing KMP SDK (Beta)](/sdk/kmp/installation/) @@ -111,7 +111,7 @@ Bugsee has a very rich feature set, yet on some platforms we managed to achieve View - View + View View @@ -133,7 +133,7 @@ Bugsee has a very rich feature set, yet on some platforms we managed to achieve View View View - View + View View View View @@ -144,7 +144,7 @@ Bugsee has a very rich feature set, yet on some platforms we managed to achieve View View - View + View View View View @@ -155,7 +155,7 @@ Bugsee has a very rich feature set, yet on some platforms we managed to achieve View View View - View + View View View View @@ -166,7 +166,7 @@ Bugsee has a very rich feature set, yet on some platforms we managed to achieve View View View - View + View View View View @@ -177,7 +177,7 @@ Bugsee has a very rich feature set, yet on some platforms we managed to achieve View View View - View + View View View View @@ -188,7 +188,7 @@ Bugsee has a very rich feature set, yet on some platforms we managed to achieve View View View - View + View View View View @@ -199,7 +199,7 @@ Bugsee has a very rich feature set, yet on some platforms we managed to achieve View View View - View + View View View View diff --git a/docs/sdk/ios/release-notes.md b/docs/sdk/ios/release-notes.md index b0ab2df..a93d5be 100644 --- a/docs/sdk/ios/release-notes.md +++ b/docs/sdk/ios/release-notes.md @@ -627,7 +627,7 @@ It is controlled by sanitizeNetworkData/BugseeSanitizeNetworkDataKey option (def - Feature: Refactor logging capturing system to produce cleaner logs - Feature: Better handling of multi-window hierarchies, lower cpu load. - Feature: Auto-hide CC text fields in common payment libraries (Stripe, Braintree, card.io) -- Feature: Add React native custom logger [read more](/sdk/react_native/logs/) +- Feature: Add React native custom logger [read more](/sdk/react_native/v6/logs/) - Bug fix: Incorrect addresses in C++ exceptions in some cases diff --git a/docs/sdk/react_native/appearance.md b/docs/sdk/react_native/appearance.md new file mode 100644 index 0000000..213cba8 --- /dev/null +++ b/docs/sdk/react_native/appearance.md @@ -0,0 +1,101 @@ +--- +title: "Appearance" +description: "Customizing the colors of the Bugsee report dialog in React Native SDK 7.x with Bugsee.appearance: the color properties on each platform, reading them back, and errors." +sidebar_position: 20 +slug: "/sdk/react_native/appearance" +--- + +:::warning[Beta] +This page documents Bugsee React Native SDK **7.x**, which is in beta and can change between betas. The stable release is **6.x**: see the [6.x documentation](/sdk/react_native/v6/installation). Upgrading? See [Migrating from 6.x to 7.x](/sdk/react_native/migration). +::: + +`Bugsee.appearance` sets the colors of the bug report dialog, so that it matches your app. It is one surface for both platforms: each property sets one color of the report dialog, on Android, on iOS, or on both. + +The colors of the feedback chat are set on the feedback package's own `appearance`; see [Feedback](/sdk/react_native/feedback#appearance). + +## Setting colors + +Assign a hex color string to a property: + +```ts +import { Platform } from 'react-native'; +import Bugsee from '@bugsee/react-native'; + +Bugsee.appearance.backgroundColor = '#101828'; +Bugsee.appearance.textColor = '#ffffff'; +Bugsee.appearance.versionColor = '#98a2b3'; + +if (Platform.OS === 'android') { + Bugsee.appearance.actionBarColor = '#1d2939'; + Bugsee.appearance.actionBarTextColor = '#ffffff'; +} else { + Bugsee.appearance.navigationBarColor = '#1d2939'; + Bugsee.appearance.cellBackgroundColor = '#1d2939'; +} +``` + +- Colors are CSS hex strings: `#RGB`, `#RGBA`, `#RRGGBB` or `#RRGGBBAA`, with alpha last. The `#` is optional, and `#RRGGBB` is opaque. +- The color is applied during the assignment, synchronously. +- Set the colors in your startup code, before a report dialog can open. You can set them before or after `Bugsee.launch`. Colors are kept in memory only, on both platforms, so set them at every app start. + +## Color properties + +Each property exists on Android, on iOS, or on both: + +| Property | Android | iOS | +| --- | --- | --- | +| `backgroundColor` | `ReportAppearance.BackgroundColor`: the dialog's background. | `reportBackgroundColor` | +| `textColor` | `ReportAppearance.TextColor`: text and input text. | `reportTextColor`: label text. | +| `versionColor` | `ReportAppearance.VersionColor`: the version label. | `reportVersionColor`: the version label. | +| `actionBarColor` | `ReportAppearance.ActionBarColor`: the action bar's background. | | +| `actionBarTextColor` | `ReportAppearance.ActionBarTextColor`: the action bar's button text. | | +| `actionBarButtonBackgroundClickedColor` | `ReportAppearance.ActionBarButtonBackgroundClickedColor`: an action bar button's background while pressed. | | +| `editTextBackgroundColor` | `ReportAppearance.EditTextBackgroundColor`: the input fields' background. | | +| `hintColor` | `ReportAppearance.HintColor`: the input fields' hint text. | | +| `severityLabelActiveColor` | `ReportAppearance.SeverityLabelActiveColor`: the selected severity label. | | +| `cellBackgroundColor` | | `reportCellBackgroundColor`: the background of the table cells. | +| `navigationBarColor` | | `reportNavigationBarColor` | +| `placeholderColor` | | `reportPlaceholderColor`: the input fields' placeholder text. | +| `sendButtonColor` | | `reportSendButtonColor`. **Not applied** in iOS SDK 7.0.0-beta7, whose report screen uses the system Done button. | +| `closeButtonColor` | | `reportCloseButtonColor`. **Not applied** in iOS SDK 7.0.0-beta7, whose report screen uses the system Cancel button. | + +Check `Platform.OS` before setting a property that exists on one platform only: setting it on the other throws. + +The report dialog has more appearance settings than these colors. The field placeholder texts (`ReportAppearance.SummaryPlaceholder` and the others on Android, `reportSummaryPlaceholder` and the others on iOS), the title of the Android notification, and the iOS theme `style` are not available from JavaScript in this beta. + +## Reading colors + +Reading a property returns the color in effect, as a lowercase `#rrggbbaa` string, alpha last: + +```ts +import Bugsee from '@bugsee/react-native'; + +const background = Bugsee.appearance.backgroundColor; // for example '#101828ff', or undefined +``` + +| Platform | A color you have not set | +| --- | --- | +| Android | `undefined`: only the colors you set are stored. | +| iOS | The iOS theme's default for that color. | + +Reading a property that does not exist on the running platform returns `undefined`. + +## Errors + +An assignment that is rejected throws, and changes nothing: + +| Assignment | Thrown | +| --- | --- | +| A value that is not a string | `TypeError` | +| A string that is not a hex color | `RangeError` | +| A property that does not exist on the running platform | `RangeError` | +| A name that is not one of the properties above (a typo, for example) | `RangeError` | +| A color that could not be applied | `Error` (`… was not applied`) | + +Error messages name the property, never the value you assigned. + +## Related pages + +- [Feedback](/sdk/react_native/feedback#appearance): the feedback chat's colors. +- [Bug reporting](/sdk/react_native/manual/bug-reporting): the report dialog and its fields. +- Native SDK reference: [Android appearance](/sdk/android/appearance#reportappearance) and [iOS appearance](/sdk/ios/appearance). diff --git a/docs/sdk/react_native/breadcrumbs.mdx b/docs/sdk/react_native/breadcrumbs.mdx new file mode 100644 index 0000000..9f2b1e2 --- /dev/null +++ b/docs/sdk/react_native/breadcrumbs.mdx @@ -0,0 +1,187 @@ +--- +title: "Breadcrumbs" +description: "What breadcrumbs are in Bugsee React Native SDK 7.x, how to turn them on, record your own with Bugsee.addBreadcrumb, and rewrite or drop them with setBreadcrumbFilter." +sidebar_position: 9 +slug: "/sdk/react_native/breadcrumbs" +--- + +:::warning[Beta] +This page documents Bugsee React Native SDK **7.x**, which is in beta and can change between betas. The stable release is **6.x**: see the [6.x documentation](/sdk/react_native/v6/installation). Upgrading? See [Migrating from 6.x to 7.x](/sdk/react_native/migration). +::: + +Breadcrumbs are small entries that record the steps leading up to an issue: a screen opened, a checkout started, a setting changed. They are placed on the report timeline next to the video, logs and network events. + +## Turning breadcrumbs on + +Breadcrumb capture is **off by default**, on both platforms. Turn it on with the `captureBreadcrumbs` launch option: + +```ts +import Bugsee, { createDefaultLaunchOptions } from '@bugsee/react-native'; + +const options = createDefaultLaunchOptions(); +options.captureBreadcrumbs = true; + +Bugsee.launch('', options); +``` + +| Option | Key | Default | Description | +| --- | --- | --- | --- | +| `captureBreadcrumbs` | `com.bugsee.option.capture.breadcrumbs` | `false` | Record breadcrumbs. While off, `Bugsee.addBreadcrumb` records nothing, and the filter is not offered any breadcrumb. | +| (no accessor) | `com.bugsee.option.capture.breadcrumbs.extras` | `false` | Attach raw system data to the automatic breadcrumbs of system events. Android: the `Intent` extras of system broadcasts. iOS: the notification `userInfo` of device events. | + +See [Configuration](/sdk/react_native/configuration) for every option. + +## Where breadcrumbs come from + +- **Your own breadcrumbs**, recorded with [`Bugsee.addBreadcrumb`](#recording-breadcrumbs). +- **Automatic breadcrumbs**, recorded in native code on both platforms. Your [filter](#filtering-breadcrumbs) sees these too. + - **Android**: app lifecycle, device orientation, keyboard events and system broadcasts, among others. + - **iOS**: app lifecycle (foreground and background), device orientation and memory warnings; screen changes of native view controllers; keyboard and text-field focus; connectivity changes; HTTP requests, with the built-in query-parameter redaction applied; taps and other gestures, while touch capture runs; blackouts; and device events such as protected-data availability, locale, time zone and clock changes, battery state and level, Low Power Mode and thermal state. + +The React Native package records no breadcrumbs from JavaScript on its own: there are no automatic navigation or touch breadcrumbs for React components. Add the ones you need with `addBreadcrumb`, for example from your navigation library's state-change listener. + +## Recording breadcrumbs + +`Bugsee.addBreadcrumb(crumb)` records one breadcrumb: + +```ts +import Bugsee from '@bugsee/react-native'; + +Bugsee.addBreadcrumb({ + category: 'navigation', + level: 'info', + message: 'Opened checkout', + type: 'default', + data: { cartSize: 3 }, +}); +``` + +| Field | Type | Required | Description | +| --- | --- | --- | --- | +| `category` | `string` | Yes | A group for the breadcrumb, such as `navigation` or `ui`. | +| `level` | `BreadcrumbLevel` | Yes | `debug`, `info`, `warning`, `error` or `fatal`. See [Levels](#levels). | +| `message` | `string` | Yes | What happened. | +| `type` | `string` | Yes | The kind of breadcrumb, such as `default` or `user`. | +| `data` | plain object or `null` | No | Extra values. Leave it out, or pass `null`, for a breadcrumb without data. | + +The strings may be empty. The native SDK stamps the time when it records the breadcrumb; there is no timestamp field to pass. + +`data` accepts the same values as [event parameters](/sdk/react_native/events-and-traces#accepted-parameter-values): strings, finite numbers, booleans, `null`, and arrays and plain objects of those, nested up to 16 levels. It is checked and copied when you call `addBreadcrumb`, so changing your object afterward does not change the breadcrumb. + +`addBreadcrumb` returns nothing. Every breadcrumb goes through your [breadcrumb filter](#filtering-breadcrumbs) before it is recorded. + +On iOS the breadcrumb is recorded on the main thread, shortly after the call returns. + +### Invalid input + +`addBreadcrumb` throws synchronously, and records nothing, when: + +| Input | Thrown | +| --- | --- | +| `crumb` that is not a plain object (including `null`, an array or a class instance) | `TypeError` | +| `category`, `message` or `type` that is not a string | `TypeError` | +| `level` that is not one of the five names | `TypeError` | +| `data` that is not a plain object or `null` | `TypeError` | +| A value in `data` that is not accepted (a `Date`, a function, a cycle, and so on) | `TypeError` | +| A non-finite number in `data`, a number of 263 or more in magnitude, or nesting deeper than 16 levels | `RangeError` | + +### When nothing is recorded + +`addBreadcrumb` does not throw when the SDK records nothing for reasons outside your input. It logs one of these lines (to logcat on Android, to the device log on iOS) and drops the breadcrumb: + +| Line | Cause | +| --- | --- | +| `addBreadcrumb dropped: capture is off or the SDK made no crumb` | `captureBreadcrumbs` is off, or the SDK could not create a breadcrumb, for example before `launch`. | +| `addBreadcrumb dropped: its data is not a JSON object` | `data` could not be read as a JSON object. | + +## Levels + +The level is passed as a name, and each native SDK stores it on its own scale: + +| Name | Android | iOS | +| --- | --- | --- | +| `debug` | Debug | Debug | +| `info` | Info | Info | +| `warning` | Warning | Warning | +| `error` | Error | Error | +| `fatal` | Fatal | **Error**: the iOS scale has no fatal level. | + +On iOS, a `fatal` breadcrumb is therefore recorded, and read back by the filter, as `error`. An automatic breadcrumb recorded at the verbose level reaches the filter as `debug`. + +## Filtering breadcrumbs + +`Bugsee.setBreadcrumbFilter(callback)` installs a filter that sees each breadcrumb before it is recorded, yours and the native SDK's. Return the breadcrumb (changed or not) to keep it, or `null` to drop it: + +```ts +import Bugsee, { type BreadcrumbSnapshot } from '@bugsee/react-native'; + +Bugsee.setBreadcrumbFilter((crumb: BreadcrumbSnapshot) => { + // Drop UI breadcrumbs entirely + if (crumb.category === 'ui') { + return null; + } + // Remove e-mail addresses from the message + if (crumb.message !== undefined) { + return { ...crumb, message: crumb.message.replace(/\S+@\S+/g, '') }; + } + return crumb; +}); +``` + +Install the filter **before** `Bugsee.launch`, at the top of your startup code. A breadcrumb filter set before `launch` stays in effect after it, on both platforms, and breadcrumbs recorded before the filter is installed are not filtered. + +There is one filter at a time. A later call replaces it, and `setBreadcrumbFilter()` or `setBreadcrumbFilter(null)` removes it, so breadcrumbs are recorded without one. A value that is not a function, `null` or `undefined` throws `TypeError` and leaves the previous filter in place. + +The callback is chosen when a breadcrumb arrives, with one exception for your own breadcrumbs: a breadcrumb you passed to `addBreadcrumb` while a filter was installed is answered by that filter, even if you clear or replace the filter on the same turn. A breadcrumb you meant to redact is not recorded unredacted because the filter changed right after you added it. + +### The breadcrumb the filter receives + +The callback gets a `BreadcrumbSnapshot`. A field the breadcrumb does not have is absent, which is why every field is optional: + +| Field | Type | Writable | +| --- | --- | --- | +| `category` | `string` | Yes | +| `level` | `BreadcrumbLevel` | Yes | +| `message` | `string` | Yes | +| `type` | `string` | Yes | +| `data` | object or `null` | Yes | +| `timestamp` | `number` | No | + +### What a filter returns + +| Result | Effect | +| --- | --- | +| An object with the writable fields | Kept, with those fields set to what you returned. | +| `null` or `undefined` | Dropped. | +| A `Promise` | Waited on; its value is treated the same way. | +| A non-object, an array or a function | Dropped. | +| An object that leaves out a writable field the snapshot had | Dropped. | +| The callback throws, or the promise rejects | Dropped. | + +A kept result must carry every writable field present in the snapshot (`category`, `level`, `message`, `type`, and `data` when the breadcrumb had data), as an own property and not `undefined`. Leaving one out drops the breadcrumb rather than keeping that field unredacted, so start from a spread of the snapshot, as in the example. + +The values must also be valid: the strings must be strings, `level` must be one of the five names, and `data` must be `null` (which clears the data) or a plain object of [accepted values](/sdk/react_native/events-and-traces#accepted-parameter-values). An invalid value drops the breadcrumb. + +This check also runs on `data` you return unchanged. A breadcrumb the native SDK recorded with data outside the accepted values (a number of 263 or more, for example) is dropped while a filter is installed, even if your filter returns it as it came. + +A field the snapshot did not have cannot be added back: it is ignored. `timestamp` is never written back, so you do not need to return it. + +### Async filters + +Your callback runs asynchronously, and it may return a promise. Capture does not wait for the answer. + +Neither platform sets a deadline for breadcrumbs, and the original breadcrumb is never recorded in place of an answer. A callback that never settles means the breadcrumb is not recorded; an answer that arrives late is still applied, and the breadcrumb is recorded then. Make sure your filter always settles: on Android, each unanswered breadcrumb also keeps holding memory for the rest of the session. + +### Reloads + +A filter is a function in the JavaScript runtime. When the runtime reloads (a development reload, for example), breadcrumbs still waiting for an answer are dropped. + +After the reload, **the filter stays on, but nothing in the new runtime answers it**, and neither platform has a deadline. Until your code calls `setBreadcrumbFilter` again, no breadcrumb is recorded, yours or the automatic ones. Call `setBreadcrumbFilter` early in your startup code, or `setBreadcrumbFilter(null)` if the new bundle has no filter. + +See [Privacy: Breadcrumbs](/sdk/react_native/privacy/breadcrumbs) for redaction guidance. + +## Related pages + +- [Privacy: Breadcrumbs](/sdk/react_native/privacy/breadcrumbs): redacting and dropping breadcrumbs. +- [Custom events & traces](/sdk/react_native/events-and-traces): other signals on the same timeline. +- [Configuration](/sdk/react_native/configuration): every launch option. diff --git a/docs/sdk/react_native/configuration.mdx b/docs/sdk/react_native/configuration.mdx index e9b8b58..c1ac95f 100644 --- a/docs/sdk/react_native/configuration.mdx +++ b/docs/sdk/react_native/configuration.mdx @@ -1,164 +1,370 @@ --- title: "Configuration" -description: "Complete reference of Bugsee React Native launch options for iOS and Android, including recording, crash detection, network capture, and trigger settings." -sidebar_position: 1 +description: "The launch options of Bugsee React Native SDK 7.x: the options object and its accessors, the shared com.bugsee.option.* keys, enums, the endpoint, and reading the effective options back." +sidebar_position: 3 slug: "/sdk/react_native/configuration" --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## Launching with options - -:::warning -iOS/iPadOS: Since v6.0.0 the underlying Bugsee iOS SDK supports the simulator; crash capture is excluded. For full functionality, launch your app with Bugsee on a real device. +:::warning[Beta] +This page documents Bugsee React Native SDK **7.x**, which is in beta and can change between betas. The stable release is **6.x**: see the [6.x documentation](/sdk/react_native/v6/installation). Upgrading? See [Migrating from 6.x to 7.x](/sdk/react_native/migration). ::: -Bugsee behavior is very customizable, if default configuration is not satisfying your needs you can launch the SDK with additional parameters. Use instance of ```IOSLaunchOptions``` or ```AndroidLaunchOptions``` for corresponding platform to change Bugsee behavior. +You configure the SDK with the options you pass to `Bugsee.launch` (and later `Bugsee.relaunch`). The same `com.bugsee.option.*` keys work on both platforms, so there is no per-platform key mapping: apart from the endpoint the Expo plugin can supply, the options you pass are the options the SDK applies, on both platforms. Enum-typed options take numbers; see [Enum reference](#enum-reference). +## Two ways to pass options - - +`launch` and `relaunch` accept either form, and both have the same effect: -```javascript -import Bugsee from 'react-native-bugsee'; +- **The options object**, from `createDefaultLaunchOptions()`, with typed accessors. Pass it as is; there is no serialize step to call. +- **A plain map** of `com.bugsee.option.*` keys, for options you build or merge yourself. -// ... + + -export default class App extends Component<{}> { - constructor(props) { - super(props); +```ts +import Bugsee, { createDefaultLaunchOptions, LogLevel } from '@bugsee/react-native'; - const bugseeOptions = new Bugsee.IOSLaunchOptions(); +const options = createDefaultLaunchOptions(); +options.duration = 120; +options.captureLogsLevel = LogLevel.Info; +options.wifiOnlyUpload = true; - bugseeOptions.shakeToReport = true; - bugseeOptions.reportPrioritySelector = true; - bugseeOptions.defaultBugPriority = Bugsee.BugseeSeverityLevel.Critical; +Bugsee.launch(token, options); +``` - Bugsee.launch("", bugseeOptions); - } -} + + + +```ts +import Bugsee, { LogLevel } from '@bugsee/react-native'; + +Bugsee.launch(token, { + 'com.bugsee.option.config.duration': 120, + 'com.bugsee.option.capture.logs.level': LogLevel.Info, + 'com.bugsee.option.config.wifi-only-upload': true, +}); ``` - + + +`BugseeLaunchOptions.serialize(options)` returns the plain map an options object stands for, as a snapshot: a later change to the object does not change a map you already took. -```javascript -import Bugsee from 'react-native-bugsee'; +## The options object -// ... +`createDefaultLaunchOptions()` returns an empty options object for the running platform: an `IOSLaunchOptions` on iOS, an `AndroidLaunchOptions` on Android. Pass a platform (`'ios'` or `'android'`) to get the other one; any other platform throws. -export default class App extends Component<{}> { - constructor(props) { - super(props); +The object is **not** pre-filled with defaults. An option you leave unset is not sent at all, so the native SDK applies its own default. Setting an accessor to `undefined` removes the key again, rather than sending an empty value that would override the default. - const bugseeOptions = new Bugsee.AndroidLaunchOptions(); +Accessors shared by both platforms live on the base class, `BugseeLaunchOptions`. Platform-only accessors live on `AndroidLaunchOptions` and `IOSLaunchOptions`, so an iOS-only option cannot be set on an Android options object by accident. To reach one, narrow the object first: - bugseeOptions.shakeToTrigger = true; - bugseeOptions.notificationBarTrigger = false; +```ts +import { + AndroidLaunchOptions, + IOSLaunchOptions, + createDefaultLaunchOptions, +} from '@bugsee/react-native'; - Bugsee.launch("", bugseeOptions); - } +const options = createDefaultLaunchOptions(); +if (options instanceof AndroidLaunchOptions) { + options.triggerByNotification = false; +} else if (options instanceof IOSLaunchOptions) { + options.captureDiskSpace = true; } ``` - - +### Any key: `setCustomOption` -Note that when you launch Bugsee, it starts working in background with the specified launch options. Later, if you change launch options and reload JS layer, they will be ignored as Bugsee is already running. So, to workaround this, you should either relaunch the whole app or call Bugsee.relaunch() with the new launch options. - - -### Available Options - -#### For iOS - -|Key|Default|Notes -|---|---|---| -|captureDeviceAndNetworkNames|false|Capture device name, wifi SSID and mobile carrier name.| -|captureLogs|true|Automatically capture all console logs| -|crashReport|true|Catch and report application crashes (\*)| -|defaultBugPriority|High|Default priority for bugs| -|defaultCrashPriority|Blocker|Default priority for crashes| -|killDetection|false|Detect abnormal termination (experimental, [read more](/sdk/ios/app-kills/))| -|maxRecordingTime|60|Maximum recording duration| -|monitorNetwork|true|Capture network traffic| -|reportPrioritySelector|false|Allow user to modify priority when reporting manually| -|screenshotToReport|true|Screenshot key to trigger report| -|shakeToReport|false|Shake gesture to trigger report| -|style|Default|Enumeration of Default, Dark and BasedOnStatusBar -|videoEnabled|true|Enable video recording| -|frameRate|High|Specifies how often frames are captured| -|screenshotEnabled|true|Attach screenshot to a report| -|wifiOnlyUpload|false|Upload reports only when a device is connected to a WiFi network| -|maxDataSize|50|Bugsee will avoid using more disk space than specified (in MB). If total Bugsee data size exceeds specified value, oldest recordings (even not sent) will be removed. Value should not be smaller than 10| - -:::warning -* iOS allows only one crash detector to be active at a time, if you insist on using an alternative solution for handling crashes, you might want to use this option and disable Bugsee from taking over. -::: +`setCustomOption(key, value)` sets any option by its real `com.bugsee.option.*` key, whether or not it has an accessor. A custom key and an accessor write to the same map, so an option that has no accessor yet, including one added in a later 7.x native release, is reachable without a new release of this package. `undefined` removes the key, as with an accessor. +```ts +options.setCustomOption('com.bugsee.option.detect.http-errors', true); +options.setCustomOption('com.bugsee.option.capture.network.body-size-limit', 10240); +``` -#### For Android +## Shared accessors + +These accessors exist on both platforms. + +| Accessor | Key | Type | Default | Description | +| --- | --- | --- | --- | --- | +| `duration` | `com.bugsee.option.config.duration` | number (seconds) | `60` | Length of the rolling capture buffer (video, logs, breadcrumbs). | +| `wifiOnlyUpload` | `com.bugsee.option.config.wifi-only-upload` | boolean | `false` | Defer report uploads until the device is on Wi-Fi. | +| `maxDataSize` | `com.bugsee.option.config.max-data-size` | number (MB) | `150` (Android) / `50` (iOS) | Disk space that reports waiting to be sent may take. Enforced on Android. On iOS this beta accepts the key but does not enforce it. See [Automatic retention](/sdk/react_native/privacy/cleanup#automatic-retention). | +| `captureVideo` | `com.bugsee.option.capture.video` | boolean | `true` | Record the screen for reports. | +| `captureNetwork` | `com.bugsee.option.capture.network` | boolean | `true` | Record network requests and responses. | +| `captureLogs` | `com.bugsee.option.capture.logs` | boolean | `true` | Capture logs automatically, including `console.*` output. `false` stops console forwarding; lines you send with `Bugsee.log` are still recorded. | +| `captureLogsLevel` | `com.bugsee.option.capture.logs.level` | `LogLevel` | `Verbose` | The most verbose level captured; less severe lines are dropped. `LogLevel.Info` keeps `Error`, `Warning` and `Info`. | +| `captureBreadcrumbs` | `com.bugsee.option.capture.breadcrumbs` | boolean | `false` | Record breadcrumbs. While off, `Bugsee.addBreadcrumb` records nothing, on both platforms. | +| `detectAndReportCrash` | `com.bugsee.option.detect.crash` | boolean | `true` | Report crashes. `false` also turns off the reporting of uncaught JavaScript errors, unhandled promise rejections and uncaught render errors. See [Turning automatic reporting off](/sdk/react_native/manual/crash-error-reporting#turning-automatic-reporting-off). | +| `detectAndReportHang` | `com.bugsee.option.detect.hang` | boolean | `false` | Report when the main thread is blocked long enough to count as a hang. | + +The **Default** column applies to both platforms unless the row gives one per platform. Read the values in effect with [`getLaunchOptions()`](#reading-the-effective-options). + +## Android accessors + +`AndroidLaunchOptions` adds these. + +| Accessor | Key | Type | Default | Description | +| --- | --- | --- | --- | --- | +| `endpoint` | `com.bugsee.option.$$ENDPOINT` | string | production | API endpoint override; see [Endpoint](#endpoint). | +| `videoMode` | `com.bugsee.option.capture.video.mode` | `VideoMode` | `V2` | Screen-capture strategy. | +| `logsUseAllSources` | `com.bugsee.option.capture.logs.allsources` | boolean | `false` | Read all logcat buffers instead of the default sources. | +| `detectAndReportExitLowMemory` | `com.bugsee.option.detect.exit.low_memory` | boolean | `true` | Report exits where the OS killed the app to reclaim memory. | +| `detectAndReportExitLowMemoryBackgroundAsError` | `com.bugsee.option.detect.exit.bg_low_memory_as_error` | boolean | `false` | Report a low-memory kill of a process that was not in the foreground as a non-fatal error rather than a crash. Applies only while `detectAndReportExitLowMemory` is on. | +| `maxPendingReports` | `com.bugsee.option.config.max-pending-reports` | number | `30` | Most reports kept waiting to be sent. | +| `maxPendingReportAge` | `com.bugsee.option.config.max-pending-report-age` | number (days) | `30` | Oldest a report waiting to be sent may get; `0` or less keeps reports until they are sent or evicted. | +| `triggerByNotification` | `com.bugsee.option.reporting.triggers.notification-bar` | boolean | `true` | Show a notification-bar entry that opens the report UI. | + +The other Android-only keys are reachable with `setCustomOption`: see [Platform-only keys](#platform-only-keys). + +## iOS accessors + +`IOSLaunchOptions` adds these. + +| Accessor | Key | Type | Default | Description | +| --- | --- | --- | --- | --- | +| `endpoint` | `endpoint` | string | production | API endpoint override; see [Endpoint](#endpoint). Not a `com.bugsee.option.*` key on iOS. | +| `captureAVPlayer` | `com.bugsee.option.capture.avplayer` | boolean | `false` | Capture video that plays through `AVPlayerLayer` and `AVPlayerViewController` in the recording. | +| `captureDiskSpace` | `com.bugsee.option.capture.disk-space` | boolean | `false` | Monitor available disk space and include it in reports as a system trace and device properties. | +| `crashHandlerType` | `com.bugsee.option.capture.crash-handler-type` | `CrashHandlerType` | `MachAndBSD` | How the crash reporter intercepts crashes. | +| `crashSignals` | `com.bugsee.option.capture.crash-signals` | number (bit set) | every signal | The fatal signals the crash reporter intercepts: `ABRT` 1, `SEGV` 2, `BUS` 4, `ILL` 8, `FPE` 16, `TRAP` 32. Add the values to combine them. | + +## Other shared keys + +These keys are accepted by both native SDKs but have no accessor. Set them with `setCustomOption`, or in a plain map. Type and default are the same on both platforms, except where a row gives one per platform. + +### Detection + +| Key | Type | Default | Description | +| --- | --- | --- | --- | +| `com.bugsee.option.detect.early-crash` | boolean | `true` | Also catch crashes very early in startup. | +| `com.bugsee.option.detect.exit` | boolean | `true` | Detect and report application exits. | +| `com.bugsee.option.detect.hang.level.fair` | number (ms) | `3000` | Main-thread block that counts as a "Fair" hang. | +| `com.bugsee.option.detect.hang.level.medium` | number (ms) | `5000` | Main-thread block that counts as a "Medium" hang. | +| `com.bugsee.option.detect.hang.level.severe` | number (ms) | `10000` | Main-thread block that counts as a "Severe" hang. | +| `com.bugsee.option.detect.http-errors` | boolean | `false` | Turn HTTP 5xx responses into error reports. | +| `com.bugsee.option.detect.main_thread_misuse` | boolean | `false` | Report file, network or database work done on the main thread. | +| `com.bugsee.option.detect.anomaly` | boolean | `false` | The statistical performance-anomaly detector. | +| `com.bugsee.option.detect.frustration` | boolean | `false` | Detect user-frustration patterns such as rage taps and report them. | + +### Capture + +| Key | Type | Default | Description | +| --- | --- | --- | --- | +| `com.bugsee.option.capture.screenshot` | boolean | `true` | Take a screenshot when a report is created. | +| `com.bugsee.option.capture.screenshot.scale` | number | `1` | Down-then-up scaling of the screenshot, which destroys fine detail; `1` turns it off. | +| `com.bugsee.option.capture.view-hierarchy` | boolean | `true` | Capture the view hierarchy for reports (also needs [`Bugsee.wrap`](/sdk/react_native/installation#4-launch-bugsee)). | +| `com.bugsee.option.capture.breadcrumbs.extras` | boolean | `false` | Attach raw system data to the breadcrumbs the native SDK records for system events: the `Intent` extras of system broadcasts on Android, the notification `userInfo` of device events on iOS. | +| `com.bugsee.option.capture.video.quality` | `VideoQuality` | `Default` | Quality of the encoded video. | +| `com.bugsee.option.capture.video.frame-rate` | `FrameRate` | `High` | How often frames are captured. | +| `com.bugsee.option.capture.video.scale` | number | `1` | Extra down-scaling of the recorded video, for example `0.5`. | +| `com.bugsee.option.capture.video.adaptive` | boolean | `false` (Android) / `true` (iOS) | Skip frames while nothing on screen has been redrawn. | +| `com.bugsee.option.capture.network.on-launch` | boolean | `false` | Start network capture during `launch` instead of when capture starts, so startup requests are not missed. | +| `com.bugsee.option.capture.network.body-size-limit` | number (bytes) | `20480` | Largest request or response body captured. | +| `com.bugsee.option.capture.network.body-without-type` | boolean | `false` | Also keep bodies that declare no content type. | +| `com.bugsee.option.capture.network.default-sanitizer` | boolean | `true` | Redact known sensitive keys in URLs, headers and JSON bodies. See [Privacy: Network](/sdk/react_native/privacy/network) for how it combines with a network filter on each platform. | + +### Reporting + +| Key | Type | Default | Description | +| --- | --- | --- | --- | +| `com.bugsee.option.reporting.triggers.shake` | boolean | `true` | Open the report UI when the device is shaken. | +| `com.bugsee.option.reporting.triggers.screenshot` | boolean | `false` | Open the report UI when the user takes a screenshot. | +| `com.bugsee.option.reporting.defaults.crash-priority` | `IssueSeverity` | `Blocker` | Severity of crash reports. | +| `com.bugsee.option.reporting.defaults.error-priority` | `IssueSeverity` | `High` | Severity of error reports. | +| `com.bugsee.option.reporting.defaults.bug-priority` | `IssueSeverity` | `High` | Severity of bug reports. | +| `com.bugsee.option.reporting.ui.summary-required` | boolean | `false` | Make the Summary field mandatory. | +| `com.bugsee.option.reporting.ui.description-required` | boolean | `false` | Make the Description field mandatory. | +| `com.bugsee.option.reporting.ui.email-required` | boolean | `false` | Make the Email field mandatory. | +| `com.bugsee.option.reporting.ui.labels-enabled` | boolean | `false` | Show the Labels field. | +| `com.bugsee.option.reporting.ui.labels-required` | boolean | `false` | Make the Labels field mandatory. | +| `com.bugsee.option.reporting.ui.priority-selector-enabled` | boolean | `false` | Let the user pick the priority. | + +### Upload and performance + +| Key | Type | Default | Description | +| --- | --- | --- | --- | +| `com.bugsee.option.config.notify-flush-delay` | number (ms) | `0` | Coalescing window before queued `Bugsee.notify` items are sent. | +| `com.bugsee.option.performance.enabled` | boolean | `true` | Master switch for performance monitoring; see [Performance monitoring](/sdk/react_native/performance). | +| `com.bugsee.option.performance.sample-rate` | number `[0, 1]` | `0.01` | Probability that a transaction is sampled for a standalone upload, which is not active in this beta; see [Sampling](/sdk/react_native/performance#sampling). | +| `com.bugsee.option.performance.adaptive-sampling` | boolean | `true` | Promote unsampled transactions that look interesting into the standalone upload, which is not active in this beta. | + +## Platform-only keys + +Keys for native WebView capture, shared or platform-only, are omitted from this page and from the shared tables above. + +Some keys are accepted by one SDK only; the other SDK does not recognize them. `setCustomOption` does not check the platform, so set these only on the platform they belong to. + +**Android only.** Native SDK reference: [Android configuration](/sdk/android/configuration). + +| Key | Type | Default | Description | +| --- | --- | --- | --- | +| `com.bugsee.option.capture.respect-flag-secure` | boolean | `true` | Protect windows that set `FLAG_SECURE`: they are blanked in the video and screenshots and left out of the view hierarchy. See [Privacy: Video](/sdk/react_native/privacy/video). | +| `com.bugsee.option.capture.video.custom-muxer` | boolean | `false` | Encode the video with Bugsee's own MP4 muxer instead of the system one. | +| `com.bugsee.option.capture.video.fullscreen-keep-running` | boolean | `true` | With `VideoMode.Fullscreen`, keep screen capture running in the background, rather than stopping it and asking the user again on return. | +| `com.bugsee.option.capture.video.fullscreen-remember-decision` | boolean | `true` | With `VideoMode.Fullscreen`, remember the user's screen-capture consent across launches. | +| `com.bugsee.option.capture.video.secure-scrolling` | boolean | `false` | With `VideoMode.V1`, skip more frames while secure views are on screen. | +| `com.bugsee.option.config.report-handler-callback-timeout` | number (seconds) | `30` | Lowers the report handler deadline; see [Report handler](/sdk/react_native/report-handler#async-callbacks-and-deadlines). | +| `com.bugsee.option.config.report-processing-in-process` | boolean | `true` | Assemble and upload reports in the app's process. `false` schedules them as system jobs, which survive the process at the cost of upload latency. | +| `com.bugsee.option.detect.anr.sampling` | boolean | `true` | Sample the main thread during an ANR, to attribute the report to the frames that were blocking. | +| `com.bugsee.option.detect.hang.sampling` | boolean | `true` | The same for hangs, while `detectAndReportHang` is on. | +| `com.bugsee.option.detect.exit.not_responding` | boolean | `true` | Report exits after the app stopped responding (ANR). | +| `com.bugsee.option.detect.exit.not_responding.as_crash` | boolean | `false` | Report those exits as crashes rather than errors. | +| `com.bugsee.option.detect.exit.*`: `dependency_died`, `excessive_resource_usage`, `other`, `package_state_changed`, `package_updated`, `permission_changed`, `unknown`, `user_requested`, `user_was_stopped` | boolean | `false` | Report exits for that reason too. | +| `com.bugsee.option.performance.upload-mode` | string | `"batched"` | How a standalone performance upload would send data; that upload is not active in this beta. | +| `com.bugsee.option.reporting.triggers.broadcast` | boolean | `false` | Let a broadcast intent open the report dialog. | + +**iOS only**, beyond the accessors above. Native SDK reference: [iOS configuration](/sdk/ios/configuration#available-options), which lists the options under their 6.x names, and the [iOS 7.x migration guide](/sdk/ios/v7/migration#2-option-keys), which maps them to these keys. + +| Key | Type | Default | Description | +| --- | --- | --- | --- | +| `com.bugsee.option.capture.bluetooth-status` | boolean | `false` | Monitor the Bluetooth state. Needs `NSBluetoothAlwaysUsageDescription` in `Info.plist`. | +| `com.bugsee.option.capture.camera-preview` | boolean | `false` | Record the live camera image shown in an `AVCaptureVideoPreviewLayer`. This records whatever the camera sees, and adds work to your camera session. Off, a camera preview records as an empty rectangle. | +| `com.bugsee.option.capture.device-network-names` | boolean | `false` | Capture the device name, the Wi-Fi network name and the mobile carrier name. | +| `com.bugsee.option.capture.logs.oslog` | boolean | `false` | Accepted and ignored in this beta: `os_log` entries are not captured. | +| `com.bugsee.option.capture.on-device-symbolication` | boolean | `false` | Symbolicate crash stack frames on the device. | +| `com.bugsee.option.capture.sample-buffer-display-layer` | boolean | `false` | Capture video shown through an `AVSampleBufferDisplayLayer` in the recording (pixel-buffer samples only). | +| `com.bugsee.option.capture.status-bar-info` | boolean | `false` | On-screen status indicators for testing the SDK itself. No effect in release builds of the SDK. | +| `com.bugsee.option.capture.video.max-frame-rate` | number (fps) | `0` | Highest capture frame rate. `0` uses the rate `capture.video.frame-rate` picks. | +| `com.bugsee.option.capture.video.min-frame-rate` | number (fps) | `0` | Lowest capture frame rate. `0` uses the rate `capture.video.frame-rate` picks. | +| `com.bugsee.option.capture.video.privacy-blur` | boolean | `true` | Blur the frames of a screen transition instead of leaving them out. `false` freezes the video for the transition. | +| `com.bugsee.option.capture.websocket` | boolean | `true` | Record WebSocket traffic; see [Network events](/sdk/react_native/network#websocket-traffic). | +| `com.bugsee.option.config.build-target` | string | none | Build target name, sent with reports. | +| `com.bugsee.option.config.build-type` | string | none | Build type, such as `debug` or `release`, sent with reports. | +| `com.bugsee.option.config.data-encryption` | number | `0` | Encryption of the collected data: `0` none, `1` on device (keys kept in the Secure Enclave), `2` end to end (decrypted only on the server, so some features, such as the video preview, are missing). The package exports no constants for it. | +| `com.bugsee.option.detect.crash.fill_empty_exception_stacks` | boolean | `false` | Fill in the stack of an uncaught `NSException` that has none from the crashing thread. This can change how crashes are grouped. | +| `com.bugsee.option.detect.crash.swift_async_stacktraces` | boolean | `true` | Stitch Swift async frames into the stacks of C++ exceptions. | +| `com.bugsee.option.reporting.ui.style` | number | `3` | Style of the report UI: `0` Light, `1` Dusk, `2` based on the status bar, `3` the system style. The package exports no constants for it. | + +## Enum reference + +Enum-typed options take a number. Use the exported constants rather than writing numbers: the values are each enum's internal value in the native SDKs, not its position in the list, so `LogLevel.Error` is `1` and `VideoMode.Fullscreen` is `20`. + +```ts +import { FrameRate, IssueSeverity, VideoQuality } from '@bugsee/react-native'; + +options.setCustomOption('com.bugsee.option.capture.video.frame-rate', FrameRate.Medium); +options.setCustomOption('com.bugsee.option.capture.video.quality', VideoQuality.High); +options.setCustomOption('com.bugsee.option.reporting.defaults.bug-priority', IssueSeverity.Critical); +``` -|Key|Default|Notes -|---|---|---| -|captureDeviceAndNetworkNames|true|Capture device name, wifi SSID and mobile carrier name.| -|captureLogs|true|Automatically capture all console logs| -|crashReport|true|Catch and report application crashes| -|defaultBugPriority|High|Default priority for bugs| -|defaultCrashPriority|Blocker|Default priority for crashes| -|frameRate|High|Specifies how often frames are captured| -|handleAnr|false|Detect ANR (Application Not Responding) and transform it to a meaningful exception| -|logLevel|Verbose|Minimal log level of Logcat messages, which will be attached to report| -|maxDataSize|50|Maximum disk space consumed by Bugsee| -|maxRecordingTime|60|Maximum recording duration| -|monitorNetwork|true|Capture network traffic| -|notificationBarTrigger|true|Trigger report from notification bar| -|screenshotToReport|false|Trigger bug report by taking screenshot on device.

Bugsee React Native SDK 5.4.0 and up.

This feature requires additional permissions:
**Android 14+**: DETECT_SCREEN_CAPTURE permission is required. More details about the permission and the native API involved in [Android development documentation](https://developer.android.com/about/versions/14/features/screenshot-detection).

**Android 13**: READ_MEDIA_IMAGES permission is required.

**Android 12** and below: READ_EXTERNAL_STORAGE permission is required.

On Android 13 and below, Bugsee SDK monitors the gallery to detect screenshot creation and that's why the permissions mentioned above are required.| -|reportPrioritySelector|false|Allow user to modify priority when reporting manually| -|screenshotEnabled|true|Attach screenshot to a report| -|serviceMode|false|Used, when Bugsee is launched from service. No video and no visual controls available. Recording continues even in background.| -|shakeToTrigger|false|Shake gesture to trigger report| -|videoEnabled|true|Enable video recording| -|videoMode|VideoMode.V3|Specifies video recording mode. Available options are: VideoMode.V1, VideoMode.V2, VideoMode.V3| -|wifiOnlyUpload|false|Upload reports only when a device is connected to a WiFi network| +| Enum | Values | Used by | +| --- | --- | --- | +| `LogLevel` | `Error` 1, `Warning` 2, `Info` 3, `Debug` 4, `Verbose` 5 | `captureLogsLevel`, `Bugsee.log` | +| `VideoMode` | `None` 0, `V1` 1, `V2` 2, `Fullscreen` 20, `DirectBuffers` 21 | `videoMode` (Android) | +| `VideoQuality` | `Default` 0, `Medium` 1, `High` 2 | `capture.video.quality` | +| `FrameRate` | `Low` 1, `Medium` 2, `High` 3 | `capture.video.frame-rate` | +| `IssueSeverity` | `VeryLow` 1, `Medium` 2, `High` 3, `Critical` 4, `Blocker` 5 | `reporting.defaults.*-priority`, report severities | +| `CrashHandlerType` | `BSD` 1, `Mach` 2, `MachAndBSD` 3 | `crashHandlerType` (iOS) | +- `FrameRate` has no `Raw`: only Android has that rate, and the same number would mean different capture rates on the two platforms. +- `CrashHandlerType` is iOS only. `BSD` uses BSD signal handlers. `Mach` uses a Mach exception handler plus a BSD handler for `SIGABRT`; other signals raised by software (`raise()`, `kill()`) are not reported. `MachAndBSD`, the default, uses both, so hardware faults and signals raised by software are reported. -## Stop, Relaunch -It is also possible to relaunch Bugsee with other options later +A number that names no value of the enum is handled differently on each platform. Android: it is dropped (as is a number that is not whole), so the option keeps its default. iOS: it is not checked, and is applied as given. Use the exported constants. +## Value types - - +Option values are booleans, numbers and strings. Other values are dropped without an error. Android: any value that is not one of those three types (an array, an object or `null`). iOS: a value whose type does not fit its key (a string for a boolean key, say). The option then keeps its default. -```javascript -// Relaunch with other options. -const options = new Bugsee.IOSLaunchOptions(); +## Endpoint -// Set other launch options -//... +The endpoint override is the one option whose key differs per platform, which is why `endpoint` is an accessor on `AndroidLaunchOptions` and `IOSLaunchOptions` rather than on the base class. Set it on the object returned by `createDefaultLaunchOptions()` and the right key is written: -Bugsee.relaunch(options); +```ts +const options = createDefaultLaunchOptions(); +options.endpoint = 'https://bugsee.example.com'; ``` - - +| Platform | Key | What is sent | +| --- | --- | --- | +| Android | `com.bugsee.option.$$ENDPOINT` | The value, trimmed. Accepted with or without `/v2`. | +| iOS | `endpoint` | The value, trimmed, without trailing slashes, with `/v2` added unless it already ends in `/v2`. | -```javascript -// Relaunch with other options. -const options = new Bugsee.AndroidLaunchOptions(); +The `endpoint` getter returns what will be sent, so on iOS it reads back with `/v2`. An empty or blank value removes the override. -// Set other launch options -//... +For a plain map, `endpointFor(platform, endpoint)` returns the entry to merge in, or `{}` for an empty value: -Bugsee.relaunch(options); +```ts +import { Platform } from 'react-native'; +import Bugsee, { endpointFor } from '@bugsee/react-native'; + +Bugsee.launch(token, { + 'com.bugsee.option.config.duration': 60, + ...endpointFor(Platform.OS === 'ios' ? 'ios' : 'android', 'https://bugsee.example.com'), +}); ``` - - +An Expo app can set the endpoint once in the [config plugin](/sdk/react_native/expo#custom-endpoint) instead. `launch` and `relaunch` then use it whenever their options carry no endpoint; an endpoint you pass yourself wins. + +## Reading the effective options + +`Bugsee.getLaunchOptions()` resolves to the options the native SDK reports as in effect, as a plain `com.bugsee.option.*` map, including the SDK's defaults for what you did not set: + +```ts +async function logDuration() { + const effective = await Bugsee.getLaunchOptions(); + console.log(effective['com.bugsee.option.config.duration']); +} +``` + +Both platforms answer before launch too, with the defaults. + +An options object's getters return what you set on it, and nothing else, until you load the reported options into it. `BugseeLaunchOptions.refreshFrom(options, reported)` installs them; each call replaces the previous report. Getters then answer with the value you set, or failing that the reported one. Reported values are never sent back when the object is passed to `launch` or `relaunch`. + +```ts +import Bugsee, { BugseeLaunchOptions, createDefaultLaunchOptions } from '@bugsee/react-native'; + +async function effectiveDuration() { + const options = createDefaultLaunchOptions(); + BugseeLaunchOptions.refreshFrom(options, await Bugsee.getLaunchOptions()); + return options.duration; // the duration in effect +} +``` + +## Changing options at runtime + +Options apply when the SDK launches. To change them later, pass a new set to `Bugsee.relaunch(options)`, which restarts the session; see [Lifecycle & status](/sdk/react_native/lifecycle). + +## Worked example + +```ts +import { Platform } from 'react-native'; +import Bugsee, { + AndroidLaunchOptions, + CrashHandlerType, + IOSLaunchOptions, + IssueSeverity, + LogLevel, + createDefaultLaunchOptions, +} from '@bugsee/react-native'; + +const options = createDefaultLaunchOptions(); +options.duration = 90; +options.captureBreadcrumbs = true; +options.captureLogsLevel = LogLevel.Info; +options.detectAndReportHang = true; +options.setCustomOption('com.bugsee.option.reporting.triggers.shake', false); +options.setCustomOption('com.bugsee.option.reporting.defaults.bug-priority', IssueSeverity.Medium); + +if (options instanceof AndroidLaunchOptions) { + options.triggerByNotification = false; +} else if (options instanceof IOSLaunchOptions) { + options.crashHandlerType = CrashHandlerType.MachAndBSD; +} + +Bugsee.launch( + Platform.OS === 'ios' ? '' : '', + options, +); +``` -or stop the events and video recording. +## Related pages -```javascript -// Stop recording completely -Bugsee.stop() -``` \ No newline at end of file +- [Installation](/sdk/react_native/installation): launching the SDK. +- [Lifecycle & status](/sdk/react_native/lifecycle): `relaunch` with new options. +- [Privacy](/sdk/react_native/privacy/overview): masking and filters. +- Native SDK reference: [Android configuration](/sdk/android/configuration) and [iOS configuration](/sdk/ios/configuration#available-options) (6.x option names; the [iOS 7.x migration guide](/sdk/ios/v7/migration#2-option-keys) maps them to the 7.x keys). diff --git a/docs/sdk/react_native/error-boundary.mdx b/docs/sdk/react_native/error-boundary.mdx new file mode 100644 index 0000000..cdc6b99 --- /dev/null +++ b/docs/sdk/react_native/error-boundary.mdx @@ -0,0 +1,146 @@ +--- +title: "Error boundary" +description: "Catch render errors in a React component tree with the ErrorBoundary component of Bugsee React Native SDK 7.x, report them to Bugsee, and render a fallback." +sidebar_position: 5 +slug: "/sdk/react_native/error-boundary" +--- + +:::warning[Beta] +This page documents Bugsee React Native SDK **7.x**, which is in beta and can change between betas. The stable release is **6.x**: see the [6.x documentation](/sdk/react_native/v6/installation). Upgrading? See [Migrating from 6.x to 7.x](/sdk/react_native/migration). +::: + +`` is a React [error boundary](https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary) that reports what it catches to Bugsee. When a component below it throws while rendering, it reports the error as a handled **error** report, with the React component stack, and renders a fallback in place of the broken tree. + +Use it around parts of your app that can fail on their own (a screen, a widget, a list item) so the rest of the app keeps working. Errors that no boundary catches are still reported, as crashes, when your root component is wrapped in `Bugsee.wrap`; see [Render errors](/sdk/react_native/manual/crash-error-reporting#render-errors). + +```tsx +import { Text } from 'react-native'; +import { ErrorBoundary } from '@bugsee/react-native'; + +export function CartScreen() { + return ( + The cart could not be shown.}> + + + ); +} +``` + +`ErrorBoundary` is a named export of `@bugsee/react-native`. It is not a property of the default `Bugsee` export, as it was in 6.x. + +## Props + +| Prop | Type | Description | +| --- | --- | --- | +| `children` | `ReactNode` | The tree to guard. | +| `fallback` | `ReactElement` or `(props: ErrorBoundaryFallbackProps) => ReactNode` | What to render after an error. Without it, the boundary renders nothing. | +| `onError` | `(error: unknown, componentStack: string \| undefined) => void` | Called after each caught error. | +| `onReset` | `(error: unknown, componentStack: string \| undefined) => void` | Called when `resetError()` runs, before the children render again. | +| `options` | `ExceptionOptions` | Options for the report, as for [`Bugsee.logException`](/sdk/react_native/manual/crash-error-reporting#options): `{ domain }`. | + +The prop types are exported as `ErrorBoundaryProps` and `ErrorBoundaryFallbackProps`. + +## Fallback + +`fallback` takes two forms. + +**An element**, rendered as is: + +```tsx +Something went wrong.}> + + +``` + +**A function**, called with an `ErrorBoundaryFallbackProps` object, so the fallback can show the error and offer a retry: + +```tsx +import { Button, Text, View } from 'react-native'; +import { ErrorBoundary, type ErrorBoundaryFallbackProps } from '@bugsee/react-native'; + +function ProfileFallback({ error, resetError }: ErrorBoundaryFallbackProps) { + return ( + + Profile failed to load: {String(error)} + )} diff --git a/docs/sdk/react_native/v6/feedback.md b/docs/sdk/react_native/v6/feedback.md new file mode 100644 index 0000000..4384ec0 --- /dev/null +++ b/docs/sdk/react_native/v6/feedback.md @@ -0,0 +1,28 @@ +--- +title: "Feedback" +description: "Enable in-app user-to-support messaging in React Native by launching Bugsee's built-in feedback UI and configuring a default greeting." +sidebar_position: 6 +slug: "/sdk/react_native/v6/feedback" +--- + +:::caution[Previous version] +This page documents Bugsee React Native SDK **6.x** (`react-native-bugsee`), the current stable release. The new **7.x** SDK (`@bugsee/react-native`) is in beta: see [Migrating from 6.x to 7.x](/sdk/react_native/migration) to evaluate it, or the [7.x overview](/sdk/react_native/overview) to start a new integration. +::: + +Bugsee implements a built-in single-threaded messenger to allow your users to communicate with your support and developers. + +## Feedback activity + +To start feedback activity from within your application: + +```javascript +Bugsee.showFeedbackUI(); +``` + +## Default greeting + +Default greeting can be set on the server in your application settings. However, for the cases when network is not available, you can set default greeting on the client as well: + +```javascript +Bugsee.setDefaultFeedbackGreeting("Hi! How can we help?"); +``` diff --git a/docs/sdk/react_native/installation.md b/docs/sdk/react_native/v6/installation.md similarity index 88% rename from docs/sdk/react_native/installation.md rename to docs/sdk/react_native/v6/installation.md index 906193d..8f9b716 100644 --- a/docs/sdk/react_native/installation.md +++ b/docs/sdk/react_native/v6/installation.md @@ -2,9 +2,13 @@ title: "React Native" description: "Step-by-step guide to install the react-native-bugsee module and launch Bugsee from JavaScript or native code on iOS and Android." sidebar_position: 0 -slug: "/sdk/react_native/installation" +slug: "/sdk/react_native/v6/installation" --- +:::caution[Previous version] +This page documents Bugsee React Native SDK **6.x** (`react-native-bugsee`), the current stable release. The new **7.x** SDK (`@bugsee/react-native`) is in beta: see [Migrating from 6.x to 7.x](/sdk/react_native/migration) to evaluate it, or the [7.x overview](/sdk/react_native/overview) to start a new integration. +::: + :::info[Agent-Assisted Setup] Ask your AI coding assistant: @@ -44,7 +48,7 @@ cd .. Download the latest version from [here](https://download.bugsee.com/sdk/ios/dynamic/Bugsee-stable.xcframework.zip) and extract it. Copy ```Bugsee.xcframework``` to your project by drag and dropping it into the right location. When asked, choose to copy: -![Copy frameworks](../ios/copy-frameworks.png) +![Copy frameworks](../../ios/copy-frameworks.png) You can also use the instructions for native iOS applications from [here](/sdk/ios/installation/) to install the native part of the Bugsee SDK for React Native. diff --git a/docs/sdk/react_native/lifecycle.md b/docs/sdk/react_native/v6/lifecycle.md similarity index 84% rename from docs/sdk/react_native/lifecycle.md rename to docs/sdk/react_native/v6/lifecycle.md index 63756f5..6698e69 100644 --- a/docs/sdk/react_native/lifecycle.md +++ b/docs/sdk/react_native/v6/lifecycle.md @@ -2,9 +2,13 @@ title: "Lifecycle events" description: "Subscribe to Bugsee SDK lifecycle events in React Native to be notified when the SDK starts, stops, pauses, or uploads reports." sidebar_position: 8 -slug: "/sdk/react_native/lifecycle" +slug: "/sdk/react_native/v6/lifecycle" --- +:::caution[Previous version] +This page documents Bugsee React Native SDK **6.x** (`react-native-bugsee`), the current stable release. The new **7.x** SDK (`@bugsee/react-native`) is in beta: see [Migrating from 6.x to 7.x](/sdk/react_native/migration) to evaluate it, or the [7.x overview](/sdk/react_native/overview) to start a new integration. +::: + Bugsee SDK silently works within your app, recording everything to assist you in debugging when something unexpected happens. Our SDK is designed as a black box, but there may be cases when you want to be notified about changes/events within Bugsee itself. Lifecycle events are designed exactly for that. Whenever internal state changes or some important event is raised, a lifecycle event is dispatched to the user code. ## Implementing callback diff --git a/docs/sdk/react_native/logs.md b/docs/sdk/react_native/v6/logs.md similarity index 75% rename from docs/sdk/react_native/logs.md rename to docs/sdk/react_native/v6/logs.md index cb7e48a..5807207 100644 --- a/docs/sdk/react_native/logs.md +++ b/docs/sdk/react_native/v6/logs.md @@ -2,9 +2,13 @@ title: "Logging" description: "Integrate Bugsee with the React Native logging system and send custom log messages with explicit log levels from JavaScript." sidebar_position: 4 -slug: "/sdk/react_native/logs" +slug: "/sdk/react_native/v6/logs" --- +:::caution[Previous version] +This page documents Bugsee React Native SDK **6.x** (`react-native-bugsee`), the current stable release. The new **7.x** SDK (`@bugsee/react-native`) is in beta: see [Migrating from 6.x to 7.x](/sdk/react_native/migration) to evaluate it, or the [7.x overview](/sdk/react_native/overview) to start a new integration. +::: + Bugsee provides a way to hook Bugsee as custom logger to React Native logging system. With this, console.log(), console.warn(), console.error() as well as React Native internal logs will be properly handled by Bugsee. diff --git a/docs/sdk/react_native/manual.md b/docs/sdk/react_native/v6/manual.md similarity index 77% rename from docs/sdk/react_native/manual.md rename to docs/sdk/react_native/v6/manual.md index 27279e4..e2db4ae 100644 --- a/docs/sdk/react_native/manual.md +++ b/docs/sdk/react_native/v6/manual.md @@ -2,9 +2,13 @@ title: "Manual invocation" description: "Programmatically trigger the bug report dialog, silently upload reports, and log non-fatal exceptions from React Native code." sidebar_position: 2 -slug: "/sdk/react_native/manual" +slug: "/sdk/react_native/v6/manual" --- +:::caution[Previous version] +This page documents Bugsee React Native SDK **6.x** (`react-native-bugsee`), the current stable release. The new **7.x** SDK (`@bugsee/react-native`) is in beta: see [Migrating from 6.x to 7.x](/sdk/react_native/migration) to evaluate it, or the [7.x overview](/sdk/react_native/overview) to start a new integration. +::: + ## Trigger Report view In addition to detection of a shake gesture or screenshot issue report view can be triggered programmatically from within diff --git a/docs/sdk/react_native/network.md b/docs/sdk/react_native/v6/network.md similarity index 70% rename from docs/sdk/react_native/network.md rename to docs/sdk/react_native/v6/network.md index c37b9b6..de277a8 100644 --- a/docs/sdk/react_native/network.md +++ b/docs/sdk/react_native/v6/network.md @@ -2,9 +2,13 @@ title: "Network capture" description: "Enable Bugsee network traffic capture in React Native, including the required Android OkHttp client factory setup." sidebar_position: 7 -slug: "/sdk/react_native/network" +slug: "/sdk/react_native/v6/network" --- +:::caution[Previous version] +This page documents Bugsee React Native SDK **6.x** (`react-native-bugsee`), the current stable release. The new **7.x** SDK (`@bugsee/react-native`) is in beta: see [Migrating from 6.x to 7.x](/sdk/react_native/migration) to evaluate it, or the [7.x overview](/sdk/react_native/overview) to start a new integration. +::: + On both Android and iOS Bugsee is capable of capturing network events made either by your JS or platform code. On iOS we automatically install required hooks and no actions should be taken from user space. However, on Android, a single line should be added to the application bootstrap flow to let us intercept network events. **Android** diff --git a/docs/sdk/react_native/v6/privacy/logs.md b/docs/sdk/react_native/v6/privacy/logs.md new file mode 100644 index 0000000..af563f0 --- /dev/null +++ b/docs/sdk/react_native/v6/privacy/logs.md @@ -0,0 +1,47 @@ +--- +title: "Privacy and console logs" +description: "Disable or sanitize console log collection in React Native to prevent personally identifiable data from being included in Bugsee reports." +sidebar_position: 3 +slug: "/sdk/react_native/v6/privacy/logs" +--- + +:::caution[Previous version] +This page documents Bugsee React Native SDK **6.x** (`react-native-bugsee`), the current stable release. The new **7.x** SDK (`@bugsee/react-native`) is in beta: see [Migrating from 6.x to 7.x](/sdk/react_native/migration) to evaluate it, or the [7.x overview](/sdk/react_native/overview) to start a new integration. +::: + +## Disabling log collection + +Console log collection can be disabled completely by providing corresponding launch flags. Refer to [configuration](/sdk/react_native/v6/configuration/) and look for **captureLogs** launch option for more info. + +## Sanitizing console logs + +Bugsee automatically captures all standard application console logs, but they can be protected as well. + +For every event to be recorded, Bugsee will call your method and provide you with an object with captured data. It is your +method's responsibility to clean up all user identifiable data from that structure and return it back to Bugsee. + +### Providing handler + +You should pass a callback to Bugsee.setLogFilter(). + +```javascript +Bugsee.setLogFilter(function (logEvent) { + // Filter log event here or return + // null to prevent it from being + // recorded at all + return logEvent; +}); + +// To stop using provided filter callback, just pass null +Bugsee.setLogFilter(null); +``` + +### Logging Events + +The handler is going to be called one time for each logged message. + + +|Property|Description|Type|Read only|Notes +|---|---|---|---|---| +|text|Text being logged|String|NO|| +|level|Logging level|Number|NO|1 - error, 2 - warning, 3 - info, 4 - debug, 5 - verbose| \ No newline at end of file diff --git a/docs/sdk/react_native/v6/privacy/network.md b/docs/sdk/react_native/v6/privacy/network.md new file mode 100644 index 0000000..d69efcf --- /dev/null +++ b/docs/sdk/react_native/v6/privacy/network.md @@ -0,0 +1,48 @@ +--- +title: "Privacy and Network traffic" +description: "Disable or filter captured network requests and responses in React Native to strip sensitive data before it is recorded by Bugsee." +sidebar_position: 2 +slug: "/sdk/react_native/v6/privacy/network" +--- + +:::caution[Previous version] +This page documents Bugsee React Native SDK **6.x** (`react-native-bugsee`), the current stable release. The new **7.x** SDK (`@bugsee/react-native`) is in beta: see [Migrating from 6.x to 7.x](/sdk/react_native/migration) to evaluate it, or the [7.x overview](/sdk/react_native/overview) to start a new integration. +::: + +## Disabling network traffic collection + +Network traffic collection can be disabled completely by providing corresponding launch flags. Refer to [configuration](/sdk/react_native/v6/configuration/) and look for **monitorNetwork** launch option for more info. + + +## Sanitizing data + +Bugsee captures network activity from the application and stores headers and in some cases body of the request and response. +In order to allow you to hide user identifiable and other sensitive data from these network logs, we let you hook into network capturing by installing network filter handler that will be called for every event about to be recorded. + +For every event to be recorded, Bugsee will call your method and provide you with an object containing captured data. It is your method's responsibility to clean up all user identifiable data from that structure and return it back to Bugsee. + +```javascript +Bugsee.setNetworkFilter(function (netEvent) { + // Filter event here as required, or return null to ignore it + return netEvent; +}); + +// To remove previously set network filter handler, just pass null to setNetworkFilter() +Bugsee.setNetworkFilter(null); +``` + +### Network Events + +The handler is going to be called several times for each network request, depending on its life-cycle. Usually for +successful requests it's going to be called twice, once with the request event (request headers and body) and once after +completion and will contain headers and body of the response. + + +|Property|Description|Type|Read only|Notes +|---|---|---|---|---| +|type|Type of network event|String|YES| 'begin', 'complete', 'cancel' or 'error'| +|method|HTTP Request Method|String|YES|'GET', 'POST', etc... +|url|Network event URL|String|NO| +|redirected_from|URL of Network event that we were redirected from|String|NO| +|body|Body|String|NO|Raw body of the request or response where available. +|headers|HTTP Headers|Object|NO|Key-value map of HTTP headers associated with the event.| \ No newline at end of file diff --git a/docs/sdk/react_native/v6/privacy/overview.md b/docs/sdk/react_native/v6/privacy/overview.md new file mode 100644 index 0000000..a85d869 --- /dev/null +++ b/docs/sdk/react_native/v6/privacy/overview.md @@ -0,0 +1,32 @@ +--- +title: "Privacy overview" +description: "Overview of privacy considerations for Bugsee in React Native and the tools available to prevent or sanitize PII in reports." +sidebar_position: 0 +slug: "/sdk/react_native/v6/privacy/overview" +--- + +:::caution[Previous version] +This page documents Bugsee React Native SDK **6.x** (`react-native-bugsee`), the current stable release. The new **7.x** SDK (`@bugsee/react-native`) is in beta: see [Migrating from 6.x to 7.x](/sdk/react_native/migration) to evaluate it, or the [7.x overview](/sdk/react_native/overview) to start a new integration. +::: + +Bugsee SDK does not continuously stream any personal data. The reports are stored locally on the phone in a cyclical buffer. Reports are being sent only when triggered by a crash, through a bug reporting UI or from an application's code. +Data sent along with the reports may include video recording of screen, network and console logs. These may potentially contain PII (Personally Identifiable Information). + +It is the sole responsibility of the application developers to remove any such data from the reports before it leaves the users’ device. + +Bugsee provides the tools and means to either prevent some data from being collected or clean the data during the collection process: + +* [Video and Touch](/sdk/react_native/v6/privacy/video/) +* [Network](/sdk/react_native/v6/privacy/network/) +* [Console logs](/sdk/react_native/v6/privacy/logs/) + + + + + + + + + + + diff --git a/docs/sdk/react_native/v6/privacy/video.md b/docs/sdk/react_native/v6/privacy/video.md new file mode 100644 index 0000000..ec22763 --- /dev/null +++ b/docs/sdk/react_native/v6/privacy/video.md @@ -0,0 +1,72 @@ +--- +title: "Privacy and video" +description: "Pause screen recording, mark UI components as protected, and define secure rectangles to hide sensitive content from Bugsee video in React Native." +sidebar_position: 1 +slug: "/sdk/react_native/v6/privacy/video" +--- + +:::caution[Previous version] +This page documents Bugsee React Native SDK **6.x** (`react-native-bugsee`), the current stable release. The new **7.x** SDK (`@bugsee/react-native`) is in beta: see [Migrating from 6.x to 7.x](/sdk/react_native/migration) to evaluate it, or the [7.x overview](/sdk/react_native/overview) to start a new integration. +::: + +# Going dark + +In some rare cases you might want to conceal the whole screen and stop recording events completely. The following APIs will come in handy, no data is being gathered between the calls to pause and resume. + +```javascript +// To stop video recording use +Bugsee.pause(); + +// And to continue +Bugsee.resume(); +``` + +### Marking view as protected in code + +You can mark any view as protected and in this case it will be covered with a black box automatically. Use `Bugsee.toggleProtected()` method to achieve this. It accepts two parameters: `component` and `state`. First should be a reference to the component you want to hide/show and second is a boolean value of `protected` flag (either `true` or `false`). + +```jsx + this.setState({text})} + value={this.state.text} ref={comp => Bugsee.toggleProtected(comp, true)} +/> +``` + + +### Protecting by coordinates + +Bugsee allows hiding screen area by absolute coordinates as well. Notice that iOS and Android approaches to hiding specific area differ a bit. + +```javascript +// Values are: X, Y, Width, Height +Bugsee.addSecureRect(10, 10, 400, 600); +``` + +You also need to be aware of the orientation that can be changed while the app is running. Recreate rectangle after orientation change, if 'black box' on video does not cover all secure fields and elements. + +Other methods of secure rectangles: + +```javascript +// Remove rect +Bugsee.removeSecureRect(10, 10, 100, 100); + +// Get all rectangles +const rectangles = await Bugsee.getAllSecureRects(); + +// Remove all rectangles +Bugsee.removeAllSecureRects(); +``` + + +## Hiding keyboard (iOS only) + +In some cases you might want to prevent the keyboard from being captured on video (as well as touches). You can use the following method to achieve the desired effect. + +```javascript +// To let us capture keyboard +Bugsee.setKeyboardVisibility(true); + +// To prevent keyboard from being captured +Bugsee.setKeyboardVisibility(false); +``` \ No newline at end of file diff --git a/docs/sdk/react_native/v6/release-notes.md b/docs/sdk/react_native/v6/release-notes.md new file mode 100644 index 0000000..7b9b908 --- /dev/null +++ b/docs/sdk/react_native/v6/release-notes.md @@ -0,0 +1,333 @@ +--- +title: "Release notes" +description: "Changelog for the Bugsee React Native SDK listing new features, bug fixes, and breaking changes for each released version." +sidebar_position: 11 +slug: "/sdk/react_native/v6/release-notes" +--- + +:::caution[Previous version] +This page documents Bugsee React Native SDK **6.x** (`react-native-bugsee`), the current stable release. The new **7.x** SDK (`@bugsee/react-native`) is in beta: see [Migrating from 6.x to 7.x](/sdk/react_native/migration) to evaluate it, or the [7.x overview](/sdk/react_native/overview) to start a new integration. +::: + +## 6.0.5 (August 18 2026) +- Internal improvements. + +## 6.0.4 (July 31 2026) +- Feat: Updated native SDKs to their latest versions (Android: [6.0.4](/sdk/android/v6/release-notes/#604-june-22-2026), iOS: [6.3.1](/sdk/ios/release-notes/#631-july-31-2026)) + +## 6.0.3 (June 23 2026) +- Feat: Updated native SDKs to their latest versions (Android: [6.0.4](/sdk/android/v6/release-notes/#604-june-22-2026), iOS: [6.1.2](/sdk/ios/release-notes/#612-march-4-2026)) + +## 6.0.2 (March 20 2026) +- Feat: Updated native SDKs to their latest versions (Android: [6.0.2](/sdk/android/v6/release-notes/#602-march-11-2026), iOS: [6.1.2](/sdk/ios/release-notes/#612-march-4-2026)) + +## 6.0.0 (March 6 2026) +- Feat: Updated native SDKs to their latest versions (Android: [6.0.0](/sdk/android/v6/release-notes/#600-december-9-2025), iOS: [6.1.2](/sdk/ios/release-notes/#612-march-4-2026)) +- Breaking: \[iOS\] Minimum deployment target is iOS 12.0 +- Breaking: \[Android\] Bugsee SDK is now built with Android SDK version 35, hence requires compileSDKVersion 35 +- Breaking: \[Android\] AGP 8.6.0 or newer is now required + +## 5.5.10 (November 18 2025) +- Feat: Updated native SDKs to their latest versions (Android: [5.9.1](/sdk/android/v6/release-notes/#591-september-29-2025), iOS: [5.5.9](/sdk/ios/release-notes/#559-november-17-2025)) + +## 5.5.9 (October 15 2025) +- Fix: \[Android\] In some scenarios, SDK may fail to launch + +## 5.5.8 (October 15 2025) +- Feat: Updated native SDKs to their latest versions (Android: [5.9.1](/sdk/android/v6/release-notes/#591-september-29-2025), iOS: [5.5.8](/sdk/ios/release-notes/#558-august-21-2025)) + +## 5.5.7 (August 21 2025) +- Feat: Updated native SDKs to their latest versions (Android: [5.8.4](/sdk/android/v6/release-notes/#584-august-21-2025), iOS: [5.5.8](/sdk/ios/release-notes/#558-august-21-2025)) + +## 5.5.6 (August 8 2025) +- Feat: Updated native SDKs to their latest versions (Android: [5.8.3](/sdk/android/v6/release-notes/#583-august-8-2025), iOS: [5.5.7](/sdk/ios/release-notes/#557-august-1-2025)) + +## 5.5.5 (August 7 2025) +- Feat: Updated native SDKs to their latest versions (Android: [5.8.2](/sdk/android/v6/release-notes/#582-august-7-2025), iOS: [5.5.7](/sdk/ios/release-notes/#557-august-1-2025)) + +## 5.5.4 (June 12 2025) +- Feat: Updated native SDKs to their latest versions (Android: [5.7.5](/sdk/android/v6/release-notes/#575-june-8-2025), iOS: [5.5.6](/sdk/ios/release-notes/#556-march-25-2025)) +- Fix: \[Android\] In some configurations, application may crash on device with 16KB memory pages + +## 5.5.3 (May 6 2025) +- Feat: Updated native SDKs to their latest versions (Android: [5.7.3](/sdk/android/v6/release-notes/#573-may-5-2025), iOS: [5.5.6](/sdk/ios/release-notes/#556-march-25-2025)) + +## 5.5.2 (March 10 2025) +- Fix: Build failure on Android +- Feat: Updated native SDKs to their latest versions (Android: [5.7.2](/sdk/android/v6/release-notes/#572-march-17-2025), iOS: [5.5.6](/sdk/ios/release-notes/#556-march-25-2025)) + +## 5.5.1 (March 10 2025) +- Feat: Add option to enable native crashes interception in Android SDK (NdkCrashReport) + +## 5.5.0 (March 10 2025) +- Feat: Updated native SDKs to their latest versions (Android: [5.7.1](/sdk/android/v6/release-notes/#571-march-4-2025), iOS: [5.5.5](/sdk/ios/release-notes/#555-february-13-2025)) +- Feat: React Native "New architecture" support + +## 5.4.3 (February 4 2025) +- Feat: Updated native SDKs to their latest versions (Android: [5.6.5](/sdk/android/v6/release-notes/#565-february-3-2025), iOS: [5.5.4](/sdk/ios/release-notes/#554-january-27-2025)) +- Fix: \[Android\] Built-in UI shifts upwards in some scenarios on Android 15 (specifically, when hosting application itself is targeting Android 15, i.e. target SDK version is 35) + +## 5.4.2 (January 22 2025) +- Fix: \[Android\] Network requests may not complete when custom networking libraries are used + +## 5.4.1 (January 14 2025) +- Fix: \[Android\] Ensure Bugsee notification entry is displayed right away when runtime notification permission is granted from within application + +## 5.4.0 (January 9 2025) +- Feat: Updated native SDKs to their latest versions (Android: 5.6.1, iOS: 5.5.3) +- Feat: Add support for bug reporting via screenshot gesture on Android + +## 5.3.0 (September 12 2024) +- Feat: Updated native SDKs to their latest versions (Android: 5.4.2, iOS: 5.3.2) +- Feat: \[Android\] Add support for 16KB memory pages +- Fix: \[Android\] Crash when bug is sent from built-in reporting UI after removing screenshot + +## 5.2.0 (September 2 2024) +- Feat: Updated native SDKs to their latest versions (Android: 5.3.1, iOS: 5.3.2) + +## 5.1.2 (May 08 2024) +- Fix: \[Android\] Video may be absent on some devices with Unisoc chipsets + +## 5.1.1 (April 19 2024) +- Fix: \[Android\] In some cases, video before FG->BG->FG transitions may be absent +- Note: \[Android\] compileSdkVersion 34 and up is now required + +## 5.1.0 (April 19 2024) +- Note: Broken release, please update to 5.1.1 or later + +## 5.0.4 (April 18 2024) +- Fix: Sourcemaps were not uploaded properly in some cases for Android + +## 5.0.3 (April 11 2024) +- Feat: Updated native SDKs to their latest versions (Android: 4.2.4, iOS: 5.0.2) + +## 5.0.2 (April 2 2024) +- Fix: "handleRejections" launch option may not be respected in some cases + +## 5.0.1 (March 21 2024) +- Feat: Updated native SDKs to their latest versions (Android: 4.2.4, iOS: 5.0.0) + +## 5.0.0 (December 25 2023) +- Feat: Updated native SDKs to their latest versions (Android: 4.2.1, iOS: 5.0.0) +- Breaking: \[iOS\] Bitcode is not present in the resulting binaries any more + +## 4.1.0 (December 6 2023) +- Feat: Updated native SDKs to their latest versions (Android: 4.2.1, iOS: 4.1.0) + +## 4.0.0 (October 2 2023) +- Feat: Updated native SDKs to their latest versions (Android: [4.0.1](/sdk/android/v6/release-notes/#401-september-30-2023), iOS: [4.0.1](/sdk/ios/release-notes/#401-september-30-2023)) +- Breaking: Changes for the underlying SDKs: [Android](/sdk/android/v6/release-notes/#401-september-30-2023) and [iOS](/sdk/ios/release-notes/#401-september-30-2023). + +## 3.2.0 (September 1 2023) +- Feat: Updated native SDKs to their latest versions (Android: 3.10.0, iOS: 3.8.0) +- Feat: Add new API to manually trigger view hierarchy capturing. Multiple view hierarchies support. + +## 3.1.3 (August 4 2023) +- Feat: Updated underlying Android SDKs to their latest version (3.8.3) +- Fix: \[Android\] Deadlock in some specific scenario when application comes to foreground + +## 3.1.2 (July 12 2023) +- Feat: Updated native SDKs to their latest versions (Android: 3.8.2, iOS: 3.7.1) +- Fix: \[Android\] In some circumstances crashes may not be reported + +## 3.1.1 (June 20 2023) +- Fix: Issue with logException() on iOS + +## 3.1.0 (June 12 2023) +- Fix: Properly respect MonitorNetwork option during relaunch + +## 3.0.10 (February 26 2023) +- Feature: Update native SDKs to the latest versions (Android: 3.4.0, iOS: 3.3.3) + +## 3.0.9 (February 14 2023) +- Fix: Crash when attachment data contained non-text value (e.g. object, array, etc) + +## 3.0.8 (January 26 2023) +- Feature: Update native SDKs to the latest versions (Android: 3.4.0, iOS: 3.3.2) +- Fix: \[Android\] Video was disabled on some Samsung devices due to the restrictive internal checks + +## 3.0.7 (January 24 2023) +- Fix: Workaround for a bug in React Native build script which caused source maps collection failure + +## 3.0.6 (January 23 2023) +- Fix: Incorrect selector in iOS bridging module may cause build errors + +## 3.0.5 (January 20 2023) +- Feature: Update native SDKs to the latest versions (Android: 3.3.0, iOS: 3.3.2) + +## 3.0.4 (December 7 2022) +- Fix: Some async exceptions were not properly handled which caused missing video and data in the consequent bug/error/crash reports +- Feature: Update native SDKs to the latest versions (Android: 3.1.0, iOS: 3.3.1) + +## 3.0.3 (November 28 2022) +- Feature: Update native SDKs to the latest versions (Android: 3.0.2, iOS: 3.2.1) + +## 3.0.2 (October 5 2022) +- Feature: Add fallbacks for Gradle properties (compileSdkVersion, targetSdkVersion, buildToolsVersion) + +## 3.0.1 (October 4 2022) +- Fix: Messages sent to Bugsee.log() may not be registered properly + +## 3.0.0 (September 19 2022) +- Feature: Update native SDKs to the latest versions (Android: 3.0.0, iOS: 3.0.0) +- Feature: Reworked debugging information uploading mechanism (source maps uploading) which is now fully automatic +- Note: Please refer to the underlying SDKs release notes to get the detailed list of changes: [Android](/sdk/android/v6/release-notes/#300-august-19-2022) / [iOS](/sdk/ios/release-notes/#300-september-1-2022) + +## 2.10.3 (June 1 2022) +- Feature: Updated native Android SDKs to their latest versions. Several race conditions are fixed + +## 2.10.2 (May 11 2022) +- Feature: Updated native Android/iOS SDKs to their latest versions + +## 2.10.1 (April 28 2022) +- Feature: Updated native Android/iOS SDKs to their latest versions + +## 2.10.0 (April 14 2022) +- Feature: Updated native Android/iOS SDKs to their latest versions + +## 2.9.1 (March 22 2022) +- Fix: Some network events were not captured properly when network filter was set (on Android) + +## 2.9.0 (March 16 2022) +- Feature: Updated native iOS SDKs to their latest version +- Feature: Clean script is not required any more for iOS project + +## 2.8.0 (February 04 2022) +- Feature: Updated native iOS SDKs to their latest version +- Feature: iOS SDK is not bundled within the NPM package any more, but rather is fetched via CocoaPods + +## 2.7.0 (January 26 2022) +- Feature: Updated native SDKs to its newer versions. +- Fix \[iOS\]: Crash during video capture in some specific conditions + +## 2.6.1 (November 12 2021) +- Feature: Improve exception information handling for better symbolication of JS call stacks + +## 2.6.0 (October 4 2021) +- Feature: Updated native Android SDKs to their latest versions. They include full support for iOS 15 and Android 12 + +## 2.5.1 (August 12 2021) +- Feature: Automatically generate stack trace when non-Error instance is supplied to logException + +## 2.5.0 (August 3 2021) +- Feature: Updated native Android SDKs to their latest versions. It includes many updates to embedded dependencies to mitigate the NonSdkApi warnings and errors. + +## 2.4.6 (June 18 2021) +- Fix: Add missing reporting UI controlling flags to launch options + +## 2.4.5 (June 17 2021) +- Fix: In some rare cases launch options may not be sent to the underlying SDKs correctly + +## 2.4.4 (June 13 2021) +- Fix: Properly handle symbolication result from built-in symbolicator + +## 2.4.3 (June 8 2021) +- Feature: Updated native SDKs to their latest versions +- Feature: Add video fallback mode launch option for Android + +## 2.4.2 (May 17 2021) +- Feature: Updated native SDKs to their latest versions + +## 2.4.1 (April 20 2021) +- Feature: Updated native SDKs to their latest versions + +## 2.4.0 (February 24 2021) +- Feature: Updated native SDKs to their latest versions +- Feature: Improve autolinking support + +## 2.3.8 (February 10 2021) +- Feature: Updated native SDKs to their latest versions + +## 2.3.7 (November 10 2020) +- Feature: Updated native SDKs to their latest versions + +## 2.3.6 (August 31 2020) +- Feature: Updated native SDKs to their latest versions + +## 2.3.5 (August 11 2020) +- Feature: Updated native Android SDK to its latest version \[1.19.0\] + +## 2.3.4 (June 9 2020) +- Feature: Updated native SDKs to their latest versions + +## 2.3.3 (April 14 2020) +- Fix: Rare crash when using ref statements and node is not found + +## 2.3.2 (June 7 2020) +- Feature: Updated native SDKs to their latest versions + +## 2.3.1 (April 7 2020) +- Fix: Update native SDK, to disable on-device symbolication by default to prevent application crash \[iOS\] + +## 2.2.2 (February 25 2020) +- Feature: Update native SDKs + +## 2.2.1 (June 27 2019) +- Fix: Memory leak in report controller (iOS) + +## 2.2.0 (June 21 2019) +- Feature: Add option to control bluetooth state monitoring (iOS) +- Feature: Add support for lifecycle events + +## 2.0.14 (Mar 27 2019) +- Fix: Update iOS SDK to the latest version to fix a rare crash during view hierarchy capturing + +## 2.0.13 (Mar 15 2019) +- Fix: Updated Android SDK to the latest version containing the fix for touch interception + +## 2.0.12 (Mar 11 2019) +- Feature: Expose methods to trigger JS and native crashes manually + +## 2.0.9 - 2.0.11 (Mar 4 2019) +- Fix: Correctly define and use Launch options in index.ts file + +## 2.0.8 (Jan 29 2019) +- Fix: Properly check for Podfile presence during linking to prevent failure + +## 2.0.1 - 2.0.7 (Jan 14 2019) +- Fix: Duplicate iOS crash/error reports +- Fix: Some crashes do not merge properly +- Fix: Fix automatic Bugsee iOS SDK module linking (via 'react-native link') +- Other minor improvements + +## 2.0.1 (Jan 1 2019) +- Fix: Update iOS SDK to 1.19.1 to prevent app crashing in some cases. For more info look [here](/sdk/ios/release-notes/) + +## 2.0.0 (December 26 2018) +- Feature: Much easier installation and initialization (via 'react-native link') +- Feature: New module design. Now everything can be controlled from JS +- Feature: Add support for custom attachments +- Feature: New exceptions capturing mechanism + +## 1.1.0 (May 31 2018) +- Feature: Network and console logs filters (privacy) +- Feature: Enable/disable keyboard capture (privacy, iOS-only) +- Feature: Secure rectangles. Allows explicitly specify area which must be concealed from recording. +- Feature: Source maps. Added support for source maps to properly symbolicate stack traces for minified JS sources. + +## 1.0.8 (Aug 31 2017) +- Maintenance and bug-fix release. + +## 1.0.7 (Apr 11 2017) +- Maintenance and bug-fix release. + +## 1.0.6 (Mar 7 2017) +- Maintenance and bug-fix release. + +## 1.0.5 (Mar 4 2017) +- Maintenance and bug-fix release. + +## 1.0.4 (Mar 4 2017) +- Maintenance and bug-fix release. + +## 1.0.3 (Dec 16 2016) +- Maintenance and bug-fix release. + +## 1.0.2 (Oct 13 2016) +- Maintenance and bug-fix release. + +## 1.0.1 (Sep 14 2016) +- Maintenance and bug-fix release. + +## 1.0.0 (Sep 14 2016) +- Initial release \ No newline at end of file diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 508ccd4..047b1d9 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -102,6 +102,20 @@ const config: Config = { { from: '/sdk/android/v7/detection', to: '/sdk/android/issue-detection/' }, { from: '/sdk/android/v7/extensions', to: '/sdk/android/extensibility/bugsee-extensions/' }, { from: '/sdk/android/v7/manual', to: '/sdk/android/manual/bug-reporting/' }, + // React Native 6.x pages moved under /sdk/react_native/v6/; old routes with no 7.x page keep their 6.x content. + { from: '/sdk/react_native/custom', to: '/sdk/react_native/v6/custom/' }, + { from: '/sdk/react_native/crashes', to: '/sdk/react_native/v6/crashes/' }, + { from: '/sdk/react_native/errorboundary', to: '/sdk/react_native/v6/errorboundary/' }, + { from: '/sdk/react_native/manual', to: '/sdk/react_native/v6/manual/' }, + // The hyphenated spelling is generated only for pages that exist, so the retired routes need it explicitly. + { from: '/sdk/react-native/custom', to: '/sdk/react_native/v6/custom/' }, + { from: '/sdk/react-native/crashes', to: '/sdk/react_native/v6/crashes/' }, + { from: '/sdk/react-native/errorboundary', to: '/sdk/react_native/v6/errorboundary/' }, + { from: '/sdk/react-native/manual', to: '/sdk/react_native/v6/manual/' }, + { from: '/sdk/react-native/v6', to: '/sdk/react_native/v6/installation/' }, + { from: '/sdk/react-native/v6/privacy', to: '/sdk/react_native/v6/privacy/overview/' }, + { from: '/sdk/react_native/v6', to: '/sdk/react_native/v6/installation/' }, + { from: '/sdk/react_native/v6/privacy', to: '/sdk/react_native/v6/privacy/overview/' }, ], // Android 7.x lived under /sdk/android/v7/ until it became the default; // every current Android page keeps answering at its old v7 address. diff --git a/sidebars.ts b/sidebars.ts index 7340430..6dd7d00 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -546,10 +546,32 @@ const sidebars: SidebarsConfig = { label: "React Native SDK", collapsed: true, items: [ + { + type: "link", + label: "Stable release (6.x) docs", + href: "/sdk/react_native/v6/installation", + }, { type: "doc", - id: "sdk/react_native/installation", - label: "Installation", + id: "sdk/react_native/overview", + label: "Overview", + }, + { + type: "category", + label: "Installation & Invocation", + collapsed: true, + items: [ + { + type: "doc", + id: "sdk/react_native/installation", + label: "Installation", + }, + { + type: "doc", + id: "sdk/react_native/expo", + label: "Expo", + }, + ], }, { type: "doc", @@ -558,11 +580,68 @@ const sidebars: SidebarsConfig = { }, { type: "doc", - id: "sdk/react_native/manual", - label: "Manual invocation", + id: "sdk/react_native/lifecycle", + label: "Lifecycle & status", + }, + { + type: "category", + label: "Manual reporting", + collapsed: true, + items: [ + { + type: "doc", + id: "sdk/react_native/manual/bug-reporting", + label: "Bug reporting", + }, + { + type: "doc", + id: "sdk/react_native/manual/crash-error-reporting", + label: "Crash & error reporting", + }, + { + type: "doc", + id: "sdk/react_native/error-boundary", + label: "Error boundary", + }, + ], + }, + { + type: "doc", + id: "sdk/react_native/report-handler", + label: "Report handler", + }, + { + type: "category", + label: "Data capture", + collapsed: true, + items: [ + { + type: "doc", + id: "sdk/react_native/network", + label: "Network events", + }, + { + type: "doc", + id: "sdk/react_native/logs", + label: "Console logs", + }, + { + type: "doc", + id: "sdk/react_native/breadcrumbs", + label: "Breadcrumbs", + }, + { + type: "doc", + id: "sdk/react_native/events-and-traces", + label: "Custom events & traces", + }, + { + type: "doc", + id: "sdk/react_native/user-session-data", + label: "User & session data", + }, + ], }, - { type: "doc", id: "sdk/react_native/custom", label: "Custom data" }, - { type: "doc", id: "sdk/react_native/logs", label: "Console logs" }, { type: "category", label: "Privacy", @@ -578,6 +657,11 @@ const sidebars: SidebarsConfig = { id: "sdk/react_native/privacy/video", label: "Video", }, + { + type: "doc", + id: "sdk/react_native/privacy/logs", + label: "Console logs", + }, { type: "doc", id: "sdk/react_native/privacy/network", @@ -585,33 +669,151 @@ const sidebars: SidebarsConfig = { }, { type: "doc", - id: "sdk/react_native/privacy/logs", - label: "Console logs", + id: "sdk/react_native/privacy/breadcrumbs", + label: "Breadcrumbs", + }, + { + type: "doc", + id: "sdk/react_native/privacy/report", + label: "Report", + }, + { + type: "doc", + id: "sdk/react_native/privacy/cleanup", + label: "Cleanup", }, ], }, - { type: "doc", id: "sdk/react_native/feedback", label: "Feedback" }, { type: "doc", - id: "sdk/react_native/network", - label: "Network capture", + id: "sdk/react_native/feedback", + label: "Feedback", }, { type: "doc", - id: "sdk/react_native/lifecycle", - label: "Lifecycle events", + id: "sdk/react_native/notification-relay", + label: "Notification relay", }, - { type: "doc", id: "sdk/react_native/crashes", label: "Crash reports" }, { type: "doc", - id: "sdk/react_native/errorboundary", - label: "Error boundary", + id: "sdk/react_native/appearance", + label: "Appearance", + }, + { + type: "doc", + id: "sdk/react_native/performance", + label: "Performance monitoring", + }, + { + type: "category", + label: "Symbolication", + collapsed: true, + items: [ + { + type: "doc", + id: "sdk/react_native/symbolication/overview", + label: "Overview", + }, + { + type: "doc", + id: "sdk/react_native/symbolication/android", + label: "Android", + }, + { + type: "doc", + id: "sdk/react_native/symbolication/ios", + label: "iOS", + }, + ], }, { type: "doc", id: "sdk/react_native/release-notes", label: "Release notes", }, + { + type: "doc", + id: "sdk/react_native/faq", + label: "FAQ", + }, + { + type: "doc", + id: "sdk/react_native/migration", + label: "Migrating from 6.x", + }, + { + type: "category", + label: "Previous versions", + collapsed: true, + items: [ + { + type: "doc", + id: "sdk/react_native/v6/installation", + label: "Installation", + }, + { + type: "doc", + id: "sdk/react_native/v6/configuration", + label: "Configuration", + }, + { + type: "doc", + id: "sdk/react_native/v6/manual", + label: "Manual invocation", + }, + { type: "doc", id: "sdk/react_native/v6/custom", label: "Custom data" }, + { type: "doc", id: "sdk/react_native/v6/logs", label: "Console logs" }, + { + type: "category", + label: "Privacy", + collapsed: true, + items: [ + { + type: "doc", + id: "sdk/react_native/v6/privacy/overview", + label: "Overview", + }, + { + type: "doc", + id: "sdk/react_native/v6/privacy/video", + label: "Video", + }, + { + type: "doc", + id: "sdk/react_native/v6/privacy/network", + label: "Network", + }, + { + type: "doc", + id: "sdk/react_native/v6/privacy/logs", + label: "Console logs", + }, + ], + }, + { type: "doc", id: "sdk/react_native/v6/feedback", label: "Feedback" }, + { + type: "doc", + id: "sdk/react_native/v6/network", + label: "Network capture", + }, + { + type: "doc", + id: "sdk/react_native/v6/lifecycle", + label: "Lifecycle events", + }, + { type: "doc", id: "sdk/react_native/v6/crashes", label: "Crash reports" }, + { + type: "doc", + id: "sdk/react_native/v6/errorboundary", + label: "Error boundary", + }, + { + type: "doc", + id: "sdk/react_native/v6/release-notes", + label: "Release notes", + }, + ], + }, ], }, {