@hot-updater/react-native 0.3.0 → 0.3.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.
Files changed (2) hide show
  1. package/README.md +2 -95
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,96 +1,3 @@
1
- # hot-updater (WIP)
2
- React Native OTA solution for internal infrastructure
1
+ # Hot Updater
3
2
 
4
- ## IOS Usage
5
- * as-is
6
- ```objective-c
7
- // filename: ios/MyApp/AppDelegate.mm
8
- // ...
9
- #import <HotUpdater/HotUpdater.h>
10
-
11
- // ...
12
-
13
- - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
14
- {
15
- #if DEBUG
16
- return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
17
- #else
18
- return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
19
- #endif
20
- }
21
-
22
- // ...
23
- ```
24
-
25
- * to-be
26
- ```objective-c
27
- // filename: ios/MyApp/AppDelegate.mm
28
- // ...
29
-
30
- - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
31
- {
32
- return [HotUpdater bundleURL];
33
- }
34
-
35
- // ...
36
- ```
37
-
38
- ## Android Usage
39
- ```kotlin
40
- package com.hotupdaterexample
41
-
42
- import android.app.Application
43
- import com.facebook.react.PackageList
44
- import com.facebook.react.ReactApplication
45
- import com.facebook.react.ReactHost
46
- import com.facebook.react.ReactNativeHost
47
- import com.facebook.react.ReactPackage
48
- import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
49
- import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
50
- import com.facebook.react.defaults.DefaultReactNativeHost
51
- import com.facebook.soloader.SoLoader
52
- import com.hotupdater.HotUpdater
53
-
54
- class MainApplication : Application(), ReactApplication {
55
-
56
- override val reactNativeHost: ReactNativeHost =
57
- object : DefaultReactNativeHost(this) {
58
- override fun getPackages(): List<ReactPackage> =
59
- PackageList(this).packages.apply {
60
- // Packages that cannot be autolinked yet can be added manually here, for example:
61
- // add(MyReactNativePackage())
62
- }
63
-
64
- override fun getJSMainModuleName(): String = "index"
65
-
66
- override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
67
-
68
- override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
69
- override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
70
-
71
- override fun getJSBundleFile(): String? {
72
- // This field
73
- return HotUpdater.getJSBundleFile() ?: super.getJSBundleFile()
74
- }
75
- }
76
-
77
- override val reactHost: ReactHost
78
- get() = getDefaultReactHost(applicationContext, reactNativeHost)
79
-
80
- override fun onCreate() {
81
- super.onCreate()
82
- SoLoader.init(this, false)
83
- // This field
84
- HotUpdater.init(applicationContext, reactNativeHost)
85
- if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
86
- // If you opted-in for the New Architecture, we load the native entry point for this app.
87
- load()
88
- }
89
- }
90
- }
91
- ```
92
-
93
- ## Android Debug
94
- ```sh
95
- > adb logcat -s HotUpdater
96
- ```
3
+ A self-hostable OTA (Over-The-Air) update solution for React Native.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hot-updater/react-native",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "React Native OTA solution for self-hosted",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -73,10 +73,10 @@
73
73
  "react": "18.3.1",
74
74
  "react-native": "0.76.2",
75
75
  "react-native-builder-bob": "^0.33.1",
76
- "@hot-updater/js": "0.3.0"
76
+ "@hot-updater/js": "0.3.1"
77
77
  },
78
78
  "dependencies": {
79
- "@hot-updater/core": "0.3.0"
79
+ "@hot-updater/core": "0.3.1"
80
80
  },
81
81
  "scripts": {
82
82
  "build": "rslib build",