@upscopeio/react-native-sdk 2026.6.3 → 2026.6.4

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.
@@ -32,5 +32,5 @@ android {
32
32
 
33
33
  dependencies {
34
34
  implementation("com.facebook.react:react-android")
35
- implementation("io.github.upscopeio:upscope-android-sdk:2026.5.1")
35
+ implementation("io.github.upscopeio:upscope-android-sdk:2026.7.0")
36
36
  }
@@ -234,9 +234,16 @@ class UpscopeModule(
234
234
  Cancellable { pendingFullDeviceRequests.remove(requestId) }
235
235
  }
236
236
 
237
- val configuration = builder.build()
238
237
  com.facebook.react.bridge.UiThreadUtil.runOnUiThread {
239
- Upscope.initialize(reactContext.applicationContext, configuration)
238
+ // The native Upscope singleton outlives the JS bundle, so on a Fast
239
+ // Refresh reload initialize() would be called again and throw
240
+ // IllegalStateException — crashing the app. Skip re-initialization
241
+ // but always re-wire the listener/activity so the reloaded JS layer
242
+ // stays connected. Build the configuration only when it's actually
243
+ // needed so reloads don't pay for it.
244
+ if (!Upscope.isInitialized) {
245
+ Upscope.initialize(reactContext.applicationContext, builder.build())
246
+ }
240
247
  Upscope.listener = upscopeListener
241
248
  reactContext.currentActivity?.let { Upscope.setCurrentActivity(it) }
242
249
  }
@@ -156,7 +156,19 @@ class UpscopeModule: RCTEventEmitter, UpscopeDelegate {
156
156
  }
157
157
 
158
158
  Task { @MainActor in
159
- try Upscope.shared.initialize(with: upscopeConfig)
159
+ // The native Upscope singleton outlives the JS bundle, so on a Fast
160
+ // Refresh reload initialize() would throw `alreadyInitialized`. Skip
161
+ // re-initialization but always re-wire the delegate so the reloaded
162
+ // JS layer keeps receiving events.
163
+ if !Upscope.shared.isInitialized {
164
+ do {
165
+ try Upscope.shared.initialize(with: upscopeConfig)
166
+ } catch {
167
+ // Guarded on isInitialized, so alreadyInitialized can't fire
168
+ // here; log anything else so a failed init isn't invisible.
169
+ NSLog("[Upscope] initialize failed: \(error)")
170
+ }
171
+ }
160
172
  Upscope.shared.delegate = self
161
173
  }
162
174
  }
@@ -5,5 +5,5 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.SDK_VERSION = void 0;
7
7
  // Auto-generated by scripts/generate-version.sh — do not edit manually
8
- const SDK_VERSION = exports.SDK_VERSION = "2026.6.3";
8
+ const SDK_VERSION = exports.SDK_VERSION = "2026.6.4";
9
9
  //# sourceMappingURL=version.js.map
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
 
3
3
  // Auto-generated by scripts/generate-version.sh — do not edit manually
4
- export const SDK_VERSION = "2026.6.3";
4
+ export const SDK_VERSION = "2026.6.4";
5
5
  //# sourceMappingURL=version.js.map
@@ -1,2 +1,2 @@
1
- export declare const SDK_VERSION = "2026.6.3";
1
+ export declare const SDK_VERSION = "2026.6.4";
2
2
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@upscopeio/react-native-sdk",
3
- "version": "2026.6.3",
3
+ "version": "2026.6.4",
4
4
  "description": "React Native SDK for Upscope cobrowsing",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // Auto-generated by scripts/generate-version.sh — do not edit manually
2
- export const SDK_VERSION = "2026.6.3";
2
+ export const SDK_VERSION = "2026.6.4";
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
11
11
  s.source_files = "ios/**/*.{h,m,mm,swift}"
12
12
  s.swift_version = "5.9"
13
13
 
14
- s.dependency "UpscopeSDK", "2026.6.6"
14
+ s.dependency "UpscopeSDK", "2026.7.0"
15
15
 
16
16
  install_modules_dependencies(s)
17
17
  end