react-native-ota-hot-update 1.0.3 → 1.0.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.
Files changed (2) hide show
  1. package/README.md +27 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # react-native-ota-hot-update
2
2
 
3
- A React Native module that allows you to control hot update same as Code Push, you can control version manager, hosting bundle js by your self, this library just control install the hot update after bundle js downloaded from your side. As we know, Code push is going to retirement in next year, that why i create that library for you can control bundle js from your backend side.
3
+ A React Native module that allows you to control hot update same as Code Push, less config than Code Push, you can control version manager, hosting bundle js by your self, this library just control install the hot update after bundle js downloaded from your side. As we know, Code push is going to retirement in next year, that why i create that library for you can control bundle js from your backend side.
4
4
 
5
5
 
6
6
  iOS GIF | Android GIF
@@ -22,6 +22,32 @@ Auto linking already, need pod install for ios:
22
22
  cd ios && pod install
23
23
  ```
24
24
 
25
+ ### IOS
26
+ Open `AppDelegate.m` and add this:
27
+
28
+ ```bash
29
+ #import "RNhotupdate.h"
30
+ ...
31
+ {
32
+ #if DEBUG
33
+ return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
34
+ #else
35
+ return [RNhotupdate getBundle]; ## add this line
36
+ #endif
37
+ }
38
+ ```
39
+
40
+ ### Android
41
+ Open `MainApplication.java/kt` and add these codes bellow:
42
+ ```bash
43
+ import com.rnhotupdate.OtaHotUpdate
44
+ ...
45
+ override fun getJSBundleFile(): String? {
46
+ return OtaHotUpdate.getBundleJS()
47
+ }
48
+
49
+ ```
50
+
25
51
  ## That's it, can check the example code
26
52
 
27
53
  Here is the guideline to control bundle js by yourself, in here i am using Firebase storage to store bundlejs file and a json file that announce new version is comming:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-ota-hot-update",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Hot update for react native",
5
5
  "main": "src/index",
6
6
  "repository": "https://github.com/vantuan88291/react-native-ota-hot-update",