@coralogix/react-native-plugin 0.16.0 → 0.17.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,9 @@
1
+ ## 0.17.0 (2026-11-10)
2
+
3
+ ### 🚀 Features
4
+
5
+ - 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.
6
+
1
7
  ## 0.16.0 (2026-11-08)
2
8
 
3
9
  ### 🚀 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.22.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
@@ -771,6 +771,32 @@ Regular JavaScript `fetch` calls and standard network requests will still be ins
771
771
 
772
772
  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
773
 
774
+ ### iOS SDK through Swift Package Manager
775
+
776
+ 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.
777
+
778
+ 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`:
779
+
780
+ ```bash
781
+ cd ios
782
+ CX_IOS_SDK_SPM=1 USE_FRAMEWORKS=dynamic pod install
783
+ ```
784
+
785
+ To keep both set for everyone who builds the app, add them at the top of your `ios/Podfile` instead:
786
+
787
+ ```ruby
788
+ ENV['CX_IOS_SDK_SPM'] = '1'
789
+ ENV['USE_FRAMEWORKS'] = 'dynamic'
790
+ ```
791
+
792
+ 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.
793
+
794
+ > [!WARNING]
795
+ > 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.
796
+
797
+ > [!NOTE]
798
+ > 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.
799
+
774
800
  ### Troubleshooting
775
801
 
776
802
  #### 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.17.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.17.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.17.0",
4
4
  "description": "Official Coralogix React Native plugin",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Coralogix",