@hot-updater/react-native 0.4.1-5 → 0.5.1

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.
@@ -59,6 +59,13 @@ class HotUpdater : ReactPackage {
59
59
  putString("HotUpdaterBundleURL", bundleURL)
60
60
  apply()
61
61
  }
62
+ val reactIntegrationManager = ReactIntegrationManager(context)
63
+
64
+ val activity: Activity? = getCurrentActivity(context)
65
+ val reactApplication: ReactApplication = reactIntegrationManager.getReactApplication(activity?.application)
66
+ val bundleURL = getJSBundleFile(context)
67
+
68
+ reactIntegrationManager.setJSBundle(reactApplication, bundleURL)
62
69
  }
63
70
 
64
71
  private fun extractZipFileAtPath(
@@ -93,9 +100,9 @@ class HotUpdater : ReactPackage {
93
100
  }
94
101
 
95
102
  fun reload(context: Context) {
96
- val activity: Activity? = getCurrentActivity(context)
97
103
  val reactIntegrationManager = ReactIntegrationManager(context)
98
104
 
105
+ val activity: Activity? = getCurrentActivity(context)
99
106
  val reactApplication: ReactApplication = reactIntegrationManager.getReactApplication(activity?.application)
100
107
  val bundleURL = getJSBundleFile(context)
101
108
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hot-updater/react-native",
3
- "version": "0.4.1-5",
3
+ "version": "0.5.1",
4
4
  "description": "React Native OTA solution for self-hosted",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -75,8 +75,8 @@
75
75
  "react-native-builder-bob": "^0.33.1"
76
76
  },
77
77
  "dependencies": {
78
- "@hot-updater/js": "0.4.1-5",
79
- "@hot-updater/core": "0.4.1-5"
78
+ "@hot-updater/js": "0.5.1",
79
+ "@hot-updater/core": "0.5.1"
80
80
  },
81
81
  "scripts": {
82
82
  "build": "rslib build",