Skip to content

Commit 447f5ed

Browse files
github-actions[bot]bitdrift-opening-capture-sdk-prs[bot]FranAguilera
authored
Update Capture SDK version to 0.22.13 (#243)
* Update Capture SDK version to 0.22.13 * Update README.md --------- Co-authored-by: bitdrift-opening-capture-sdk-prs[bot] <154374407+bitdrift-opening-capture-sdk-prs[bot]@users.noreply.github.com> Co-authored-by: Fran Aguilera <fran@bitdrift.io>
1 parent ef7286b commit 447f5ed

File tree

6 files changed

+41
-5
lines changed

6 files changed

+41
-5
lines changed

.auto-release-react-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.11.13
1+
0.11.14

packages/react-native/BdReactNative.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ require "json"
22

33
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
44
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
5-
capture_version = '0.22.12'
5+
capture_version = '0.22.13'
66

77
Pod::Spec.new do |s|
88
s.name = "BdReactNative"

packages/react-native/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,42 @@ init('<api key>', SessionStrategy.Activity, {
103103
- `UNSTABLE_enableJsErrors`: When `true`, enables reporting of JavaScript errors (both fatal and non-fatal) via React Native's global error handler. Captures unhandled exceptions with stack traces. This feature is experimental and may change in future releases. Defaults to `false`.
104104
- `UNSTABLE_onBeforeReportSend`: Called before an issue report is sent. Receives `{ reportType, reason, details, sessionId, fields }`.
105105

106+
### Previous Run Info
107+
108+
Use `getPreviousRunInfo()` to check whether the previous app run ended in a fatal termination.
109+
110+
```ts
111+
import {
112+
getPreviousRunInfo,
113+
init,
114+
SessionStrategy,
115+
type PreviousRunInfo,
116+
} from '@bitdrift/react-native';
117+
118+
init('<api key>', SessionStrategy.Activity);
119+
120+
const previousRunInfo: PreviousRunInfo = getPreviousRunInfo();
121+
122+
if (previousRunInfo?.hasFatallyTerminated) {
123+
console.log('Previous run terminated fatally', previousRunInfo.terminationReason);
124+
}
125+
```
126+
127+
`PreviousRunInfo` shape:
128+
129+
```ts
130+
type PreviousRunInfo = {
131+
hasFatallyTerminated: boolean;
132+
terminationReason?: string;
133+
} | null;
134+
```
135+
136+
- This API is synchronous.
137+
- Call it after `init(...)`.
138+
- Android: available on API 30+ (Android 11+); returns `null` on older versions.
139+
- iOS simulator: returns `null` by design; use a physical device to validate.
140+
- `terminationReason` is currently populated on Android. iOS currently provides `hasFatallyTerminated`.
141+
106142
```js
107143
import { trace, debug, info, warn, error } from '@bitdrift/react-native';
108144

packages/react-native/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ dependencies {
112112
//noinspection GradleDynamicVersion
113113
implementation "com.facebook.react:react-native:+"
114114
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
115-
api 'io.bitdrift:capture:0.22.12'
115+
api 'io.bitdrift:capture:0.22.13'
116116
}
117117

118118
if (isNewArchitectureEnabled()) {

packages/react-native/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@bitdrift/react-native",
33
"version": "0.11.13",
4-
"captureSdkVersion": "0.22.12",
4+
"captureSdkVersion": "0.22.13",
55
"description": "bitdrift integration for React Native",
66
"main": "dist/commonjs/index",
77
"module": "dist/module/index",

packages/react-native/src/plugin/withAndroid.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const withBitdriftAppBuildGradle: ConfigPlugin<PluginProps | void> = (
2828
) {
2929
config.modResults.contents =
3030
`plugins {
31-
id 'io.bitdrift.capture-plugin' version '0.22.12'
31+
id 'io.bitdrift.capture-plugin' version '0.22.13'
3232
}
3333
3434
` + config.modResults.contents;

0 commit comments

Comments
 (0)