diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e907f5..d0731f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,37 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.2.3] - 2025-12-18 + +### Added +- Added a capture error API to allow apps to report runtime errors through the SDK (Android). + +### Changed +- Refined rage tap detection logic to avoid misclassifying double taps as rage taps (Android). +- Optimized session recording and network request handling to reduce overhead during active sessions (Android). + +### Fixed +- Fixed timer response rounding to return accurate duration values. +- Fixed incorrect engagement time calculation in crash scenarios. +- Fixed ANRs occurring during SDK initialization on Android. + + +## [2.2.2] - 2025-11-26 + +### Added +- Support for session capturing on Android 16 devices. +- Support for tracking hybrid platforms and their versions. +- iOS only: Added automatic restoration of sessions lost when the app is killed. + +### Changed +- Improved masking behavior on `RecyclerView` scrolls. +- Improved session upload reliability and stability. +- Optimized network bandwidth usage. +- iOS only: Improved crash log parsing and formatting for clearer diagnostics. + +### Fixed +- Fixed an issue in the logout flow. + ## [2.2.1] - 2025-10-17 ### Added diff --git a/README.md b/README.md index c5cf993..67e2222 100644 --- a/README.md +++ b/README.md @@ -3,53 +3,54 @@ DevRev SDK, used for integrating DevRev services into your React Native and Expo apps. - [DevRev SDK for React Native and Expo](#devrev-sdk-for-react-native-and-expo) - - [Quickstart](#quickstart) - - [Requirements](#requirements) - - [Installation](#installation) - - [Expo](#expo) - - [Set up the DevRev SDK](#set-up-the-devrev-sdk) - - [Features](#features) - - [Identification](#identification) - - [Identify an unverified user](#identify-an-unverified-user) - - [Identify a verified user](#identify-a-verified-user) - - [Generate an AAT](#generate-an-aat) - - [Exchange your AAT for a session token](#exchange-your-aat-for-a-session-token) - - [Identify the verified user](#identify-the-verified-user) - - [Update the user](#update-the-user) - - [Logout](#logout) - - [Identity model](#identity-model) - - [Properties](#properties) - - [User traits](#user-traits) - - [Organization traits](#organization-traits) - - [Account traits](#account-traits) - - [Support chat](#support-chat) - - [Create a new support conversation](#create-a-new-support-conversation) - - [In-app link handling](#in-app-link-handling) - - [In-app link callback](#in-app-link-callback) - - [Dynamic theme configuration](#dynamic-theme-configuration) - - [Analytics](#analytics) - - [Session analytics](#session-analytics) - - [Opt in or out](#opt-in-or-out) - - [Session recording](#session-recording) - - [Session properties](#session-properties) - - [Mask sensitive data](#mask-sensitive-data) - - [Mask elements inside web views](#mask-elements-inside-web-views) - - [User interaction tracking](#user-interaction-tracking) - - [Timers](#timers) - - [Track screens](#track-screens) - - [Manage screen transitions (Android only)](#manage-screen-transitions-android-only) - - [Push notifications](#push-notifications) - - [Configuration](#configuration) - - [Register for push notifications](#register-for-push-notifications) - - [Unregister from push notifications](#unregister-from-push-notifications) - - [Handle push notifications](#handle-push-notifications) - - [Android](#android) - - [iOS](#ios) - - [Sample app (without framework)](#sample-app-without-framework) - - [Sample app (Expo)](#sample-app-expo) - - [Troubleshooting](#troubleshooting) - - [ProGuard (Android only)](#proguard-android-only) - - [Migration Guide](#migration-guide) + - [Quickstart](#quickstart) + - [Requirements](#requirements) + - [Installation](#installation) + - [Expo](#expo) + - [Set up the DevRev SDK](#set-up-the-devrev-sdk) + - [Features](#features) + - [Identification](#identification) + - [Identify an unverified user](#identify-an-unverified-user) + - [Identify a verified user](#identify-a-verified-user) + - [Generate an AAT](#generate-an-aat) + - [Exchange your AAT for a session token](#exchange-your-aat-for-a-session-token) + - [Identify the verified user](#identify-the-verified-user) + - [Update the user](#update-the-user) + - [Logout](#logout) + - [Identity model](#identity-model) + - [Properties](#properties) + - [User traits](#user-traits) + - [Organization traits](#organization-traits) + - [Account traits](#account-traits) + - [Support chat](#support-chat) + - [Create a new support conversation](#create-a-new-support-conversation) + - [In-app link handling](#in-app-link-handling) + - [In-app link callback](#in-app-link-callback) + - [Dynamic theme configuration](#dynamic-theme-configuration) + - [Analytics](#analytics) + - [Session analytics](#session-analytics) + - [Opt in or out](#opt-in-or-out) + - [Session recording](#session-recording) + - [Session properties](#session-properties) + - [Mask sensitive data](#mask-sensitive-data) + - [Mask elements inside web views](#mask-elements-inside-web-views) + - [User interaction tracking](#user-interaction-tracking) + - [Timers](#timers) + - [Capture errors](#capture-errors) + - [Track screens](#track-screens) + - [Manage screen transitions (Android only)](#manage-screen-transitions-android-only) + - [Push notifications](#push-notifications) + - [Configuration](#configuration) + - [Register for push notifications](#register-for-push-notifications) + - [Unregister from push notifications](#unregister-from-push-notifications) + - [Handle push notifications](#handle-push-notifications) + - [Android](#android) + - [iOS](#ios) + - [Sample app (without framework)](#sample-app-without-framework) + - [Sample app (Expo)](#sample-app-expo) + - [Troubleshooting](#troubleshooting) + - [ProGuard (Android only)](#proguard-android-only) + - [Migration Guide](#migration-guide) ## Quickstart @@ -479,6 +480,41 @@ To stop a timer, use the following method: DevRev.endTimer(name: string, properties: { [key: string]: string }) ``` +#### Capture errors + +You can report a handled error from a catch block using the `captureError` function. + +This ensures that even if the error is handled in your app, it will still be logged for diagnostics. + +```typescript +DevRev.captureError( + error: Error | string, + tag: string +) +``` + +**Example:** + +```typescript +try { +} catch (error) { + DevRev.captureError( + error, + 'network-failure' + ); +} +``` + +**Example with Error:** + +```typescript +try { + throw new Error('Something went wrong'); +} catch (error) { + DevRev.captureError(error, 'custom-error'); +} +``` + #### Track screens The DevRev SDK offers automatic screen tracking to help you understand how users navigate through your app. Although screens are automatically tracked, you can manually track screens using the following method: diff --git a/devrev-sdk-react-native-2.2.3.tgz b/devrev-sdk-react-native-2.2.3.tgz new file mode 100644 index 0000000..6c80b76 Binary files /dev/null and b/devrev-sdk-react-native-2.2.3.tgz differ diff --git a/sample/package.json b/sample/package.json index f4ae592..6dbaf88 100644 --- a/sample/package.json +++ b/sample/package.json @@ -10,7 +10,7 @@ "build:ios": "react-native build-ios --scheme DevRevSDKSample --mode Debug --extra-params \"-sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO\"" }, "dependencies": { - "@devrev/sdk-react-native": "^2.2.1", + "@devrev/sdk-react-native": "^2.2.3", "@notifee/react-native": "^9.1.3", "@react-native-community/cli-platform-ios": "^13.6.9", "@react-native-firebase/app": "^21.0.0", diff --git a/sample/react-native/Gemfile b/sample/react-native/Gemfile index 6a4c5f1..70cceb0 100644 --- a/sample/react-native/Gemfile +++ b/sample/react-native/Gemfile @@ -1,12 +1,14 @@ source 'https://rubygems.org' # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version -ruby ">= 2.6.10" +# Ruby 3.4+ removed kconv from standard library +ruby ">= 2.6.10", "< 3.4.0" # Exclude problematic versions of cocoapods and activesupport that causes build failures. -gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1' +# CocoaPods version must match the version used to generate Podfile.lock (1.16.2) +gem 'cocoapods', '>= 1.16.2' gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0' -gem 'xcodeproj', '< 1.26.0' +# xcodeproj constraint removed - CocoaPods 1.16.2+ requires xcodeproj >= 1.27.0 gem 'concurrent-ruby', '< 1.3.4' # Ruby 3.4.0 has removed some libraries from the standard library. diff --git a/sample/react-native/ios/DevRevSDKSampleRN.xcworkspace/xcshareddata/swiftpm/Package.resolved b/sample/react-native/ios/DevRevSDKSampleRN.xcworkspace/xcshareddata/swiftpm/Package.resolved index ae2d07c..498abd9 100644 --- a/sample/react-native/ios/DevRevSDKSampleRN.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/sample/react-native/ios/DevRevSDKSampleRN.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -6,8 +6,8 @@ "kind" : "remoteSourceControl", "location" : "git@github.com:devrev/devrev-sdk-ios.git", "state" : { - "revision" : "b394b096d9b8dc015adbe3f58218c985a6a71787", - "version" : "2.2.4" + "revision" : "68e7e4904de5dc5744191efea0bb2ef43a87d008", + "version" : "2.2.5" } } ],