@coralogix/react-native-plugin 0.16.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,32 @@
1
+ ## 0.18.0 (2026-11-12)
2
+
3
+ ### 🚀 Features
4
+
5
+ - On iOS, an uncaught C++ exception is now reported with its type and message, and an ANR now carries the stacks of every thread, main thread first.
6
+ - On iOS, a hang the app does not survive is now reported once: live when possible, otherwise as an ANR crash the next time the app starts.
7
+
8
+ ### 🩹 Fixes
9
+
10
+ - On iOS, a crash that could not be sent before the app closed, or while the device was offline, is now delivered later in the session and screen it happened in, instead of being lost.
11
+ - On iOS, `ignoreErrors` now also matches the error type (for example `SIGSEGV` or `ANR`), and an ANR is no longer reported each time the app returns from the background.
12
+
13
+ ### 📝 Notes
14
+
15
+ - On iOS, crash messages now name what crashed, such as `NSInvalidArgumentException: <reason>` or `SIGSEGV (SEGV_MAPERR)`, with the signal as the error type, as on Android. Update queries that match the previous crash messages.
16
+ - On iOS, an ANR is now reported once the main thread has been blocked for 5 seconds, and system hang reports are no longer sent as errors.
17
+ - On iOS, a crash that happens before `CoralogixRum.init` has finished, including a native crash while the app starts, is no longer reported, as on Android. Initialize the plugin as early as possible in app startup.
18
+ - On iOS, crash events are not passed to `beforeSend`; `ignoreErrors` still applies to them.
19
+
20
+ ### ⬆️ Dependency Updates
21
+
22
+ - Native iOS SDK bumped to **2.23.0**.
23
+
24
+ ## 0.17.0 (2026-11-10)
25
+
26
+ ### 🚀 Features
27
+
28
+ - On iOS, the native SDK can now come from Swift Package Manager instead of CocoaPods: run `CX_IOS_SDK_SPM=1 USE_FRAMEWORKS=dynamic pod install` on React Native 0.75 or later. CocoaPods stays the default.
29
+
1
30
  ## 0.16.0 (2026-11-08)
2
31
 
3
32
  ### 🚀 Features
package/CxSdk.podspec CHANGED
@@ -16,9 +16,54 @@ Pod::Spec.new do |s|
16
16
 
17
17
  s.source_files = "ios/**/*.{h,m,mm,swift}"
18
18
 
19
- s.dependency 'Coralogix','2.22.0'
20
- s.dependency 'CoralogixInternal','2.22.0'
21
- s.dependency 'SessionReplay','2.22.0'
19
+ # The native iOS SDK comes from one of two places:
20
+ #
21
+ # - Swift Package Manager, when the app sets CX_IOS_SDK_SPM=1 for `pod install` and runs
22
+ # React Native 0.75 or later, the first release with the `spm_dependency` helper.
23
+ # This is the only way to get native SDK releases newer than the last one published
24
+ # to CocoaPods trunk, which stops accepting new pods on 2 Dec 2026.
25
+ # - CocoaPods trunk otherwise. Once ios/COCOAPODS_FROZEN_SDK_VERSION exists, trunk pods
26
+ # stay on that version while SPM moves ahead of it.
27
+ #
28
+ # scripts/check-ios-sdk-pins.sh keeps the two versions consistent.
29
+ cx_ios_sdk_version = '2.23.0'
30
+ cx_ios_sdk_products = ['Coralogix', 'CoralogixInternal', 'SessionReplay']
31
+ cx_ios_sdk_frozen_file = File.join(__dir__, 'ios', 'COCOAPODS_FROZEN_SDK_VERSION')
32
+ cx_ios_sdk_pod_version =
33
+ File.exist?(cx_ios_sdk_frozen_file) ? File.read(cx_ios_sdk_frozen_file).strip : cx_ios_sdk_version
34
+
35
+ cx_ios_sdk_spm_setting = ENV['CX_IOS_SDK_SPM'].to_s.strip.downcase
36
+ cx_ios_sdk_spm_requested = ['1', 'true'].include?(cx_ios_sdk_spm_setting)
37
+ cx_ios_sdk_spm_available = respond_to?(:spm_dependency, true)
38
+ # CocoaPods evaluates this podspec several times per install; say each thing once.
39
+ cx_ios_sdk_warn = lambda do |message|
40
+ Pod::UI.warn(message) unless Pod::UI.warnings.any? { |warning| warning[:message] == message }
41
+ end
42
+
43
+ unless cx_ios_sdk_spm_requested || ['', '0', 'false'].include?(cx_ios_sdk_spm_setting)
44
+ cx_ios_sdk_warn.call "[CxSdk] CX_IOS_SDK_SPM=#{ENV['CX_IOS_SDK_SPM']} is not recognized; set it to 1 to get " \
45
+ "the Coralogix iOS SDK from Swift Package Manager. Installing it from CocoaPods."
46
+ end
47
+
48
+ if cx_ios_sdk_spm_requested && cx_ios_sdk_spm_available
49
+ # A warning, not an error: a Podfile can call use_frameworks! without setting the variable.
50
+ unless ENV['USE_FRAMEWORKS'] == 'dynamic'
51
+ cx_ios_sdk_warn.call "[CxSdk] The Coralogix iOS SDK from Swift Package Manager needs the pods built as " \
52
+ "dynamic frameworks (USE_FRAMEWORKS=dynamic). With static libraries or static " \
53
+ "frameworks, Xcode 16 fails to link the app with duplicate symbol errors."
54
+ end
55
+ spm_dependency(s,
56
+ url: 'https://github.com/coralogix/cx-ios-sdk',
57
+ requirement: { kind: 'exactVersion', version: cx_ios_sdk_version },
58
+ products: cx_ios_sdk_products
59
+ )
60
+ else
61
+ if cx_ios_sdk_spm_requested
62
+ cx_ios_sdk_warn.call "[CxSdk] CX_IOS_SDK_SPM needs React Native 0.75 or later; " \
63
+ "installing the Coralogix iOS SDK #{cx_ios_sdk_pod_version} from CocoaPods instead."
64
+ end
65
+ cx_ios_sdk_products.each { |product| s.dependency product, cx_ios_sdk_pod_version }
66
+ end
22
67
 
23
68
  # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
24
69
  # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
package/README.md CHANGED
@@ -500,6 +500,8 @@ await CoralogixRum.init({
500
500
  });
501
501
  ```
502
502
 
503
+ On iOS, crash events are sent without passing through `beforeSend`. Use `ignoreErrors` to filter them.
504
+
503
505
  #### Telling excluded events apart in `beforeSend`
504
506
 
505
507
  Every event carries `session_context.isSessionSampledIn`. `false` means the event
@@ -771,6 +773,32 @@ Regular JavaScript `fetch` calls and standard network requests will still be ins
771
773
 
772
774
  However, the plugin is the only way to capture network activity from third-party libraries or SDKs that use their own `OkHttpClient` instances internally.
773
775
 
776
+ ### iOS SDK through Swift Package Manager
777
+
778
+ By default, `pod install` installs the native Coralogix iOS SDK (the `Coralogix`, `CoralogixInternal` and `SessionReplay` pods) from CocoaPods trunk. CocoaPods trunk stops accepting new pods on 2 December 2026, so native iOS SDK releases after that date are available only through Swift Package Manager.
779
+
780
+ From plugin version 0.17.0, on React Native 0.75 or later, set `CX_IOS_SDK_SPM=1` and build your pods as dynamic frameworks when you run `pod install`:
781
+
782
+ ```bash
783
+ cd ios
784
+ CX_IOS_SDK_SPM=1 USE_FRAMEWORKS=dynamic pod install
785
+ ```
786
+
787
+ To keep both set for everyone who builds the app, add them at the top of your `ios/Podfile` instead:
788
+
789
+ ```ruby
790
+ ENV['CX_IOS_SDK_SPM'] = '1'
791
+ ENV['USE_FRAMEWORKS'] = 'dynamic'
792
+ ```
793
+
794
+ The plugin then adds the `cx-ios-sdk` Swift package to its pod, at the native SDK version that plugin version pins, and React Native links it into your app. You don't need to change your Xcode project.
795
+
796
+ > [!WARNING]
797
+ > Keep the pods as dynamic frameworks. With React Native's default static libraries, or with static frameworks (`USE_FRAMEWORKS=static`), Xcode 16 links the SDK into the app twice and the build fails with duplicate symbol errors. Other libraries in your app may need their own fixes to build as dynamic frameworks. If your app can't use dynamic frameworks, keep installing the SDK from CocoaPods.
798
+
799
+ > [!NOTE]
800
+ > On React Native earlier than 0.75, `CX_IOS_SDK_SPM=1` has no effect: `pod install` prints a warning and installs the SDK from CocoaPods trunk.
801
+
774
802
  ### Troubleshooting
775
803
 
776
804
  #### URL.origin is not implemented
package/index.cjs.js CHANGED
@@ -1104,7 +1104,7 @@ function stopJsRefreshRateSampler() {
1104
1104
  appStateSub = null;
1105
1105
  }
1106
1106
 
1107
- var version = "0.16.0";
1107
+ var version = "0.18.0";
1108
1108
  var pkg = {
1109
1109
  version: version};
1110
1110
 
package/index.esm.js CHANGED
@@ -1102,7 +1102,7 @@ function stopJsRefreshRateSampler() {
1102
1102
  appStateSub = null;
1103
1103
  }
1104
1104
 
1105
- var version = "0.16.0";
1105
+ var version = "0.18.0";
1106
1106
  var pkg = {
1107
1107
  version: version};
1108
1108
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coralogix/react-native-plugin",
3
- "version": "0.16.0",
3
+ "version": "0.18.0",
4
4
  "description": "Official Coralogix React Native plugin",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Coralogix",