@onekeyfe/react-native-background-thread 3.0.88 → 3.0.89

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.
@@ -44,6 +44,19 @@ class BgMgrNSDataJSIBuffer : public facebook::jsi::Buffer {
44
44
 
45
45
  } // namespace
46
46
 
47
+ static RCTReactNativeFactory *CreateBackgroundReactNativeFactory(
48
+ id<RCTReactNativeFactoryDelegate> delegate) {
49
+ Class expoFactoryClass = NSClassFromString(@"EXReactNativeFactory");
50
+ if (expoFactoryClass &&
51
+ [expoFactoryClass isSubclassOfClass:[RCTReactNativeFactory class]]) {
52
+ [BTLogger info:@"Using Expo React Native factory for background runtime"];
53
+ return [(RCTReactNativeFactory *)[expoFactoryClass alloc]
54
+ initWithDelegate:delegate];
55
+ }
56
+
57
+ return [[RCTReactNativeFactory alloc] initWithDelegate:delegate];
58
+ }
59
+
47
60
  // Exactly-once settle guard for the bg watchdog — same design as
48
61
  // SplitBundleLoader's SBLSettleGuard. An ARC object captured by both the
49
62
  // executor block and the watchdog dispatch_after; ARC keeps its lock alive
@@ -255,7 +268,7 @@ static NSString *const MODULE_DEBUG_URL = @"http://localhost:8082/apps/mobile/ba
255
268
  NSDictionary *initialProperties = @{};
256
269
  NSDictionary *launchOptions = @{};
257
270
  self.reactNativeFactoryDelegate = [[BackgroundReactNativeDelegate alloc] init];
258
- self.reactNativeFactory = [[RCTReactNativeFactory alloc] initWithDelegate:self.reactNativeFactoryDelegate];
271
+ self.reactNativeFactory = CreateBackgroundReactNativeFactory(self.reactNativeFactoryDelegate);
259
272
 
260
273
  // Only set jsBundleSource for debug HTTP URLs or explicit OTA overrides.
261
274
  // Leaving the default release name ("background.bundle") unset lets the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/react-native-background-thread",
3
- "version": "3.0.88",
3
+ "version": "3.0.89",
4
4
  "description": "react-native-background-thread",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",
@@ -63,8 +63,8 @@
63
63
  "@eslint/compat": "^1.3.2",
64
64
  "@eslint/eslintrc": "^3.3.1",
65
65
  "@eslint/js": "^9.35.0",
66
- "@react-native/babel-preset": "0.83.0",
67
- "@react-native/eslint-config": "0.83.0",
66
+ "@react-native/babel-preset": "0.86.2",
67
+ "@react-native/eslint-config": "0.86.2",
68
68
  "@release-it/conventional-changelog": "^10.0.1",
69
69
  "@types/jest": "^29.5.14",
70
70
  "@types/react": "^19.2.0",
@@ -76,8 +76,8 @@
76
76
  "jest": "^29.7.0",
77
77
  "lefthook": "^2.0.3",
78
78
  "prettier": "^2.8.8",
79
- "react": "19.2.0",
80
- "react-native": "patch:react-native@npm%3A0.83.0#~/.yarn/patches/react-native-npm-0.83.0-577d0f2d83.patch",
79
+ "react": "19.2.3",
80
+ "react-native": "patch:react-native@npm%3A0.86.2#~/.yarn/patches/react-native-npm-0.86.2-c9d546616f.patch",
81
81
  "react-native-builder-bob": "^0.40.17",
82
82
  "release-it": "^19.0.4",
83
83
  "turbo": "^2.5.6",