Skip to content

Commit

Permalink
Merge pull request #2 from vantuan88291/release/1.0.9
Browse files Browse the repository at this point in the history
Release 1.0.9
  • Loading branch information
vantuan88291 authored Sep 21, 2024
2 parents 0d89ae5 + 1b31c2c commit 6dc7d1e
Show file tree
Hide file tree
Showing 7 changed files with 893 additions and 27 deletions.
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,10 @@ After you have done everything related to version manager, you just handle the w

```bash
import hotUpdate from 'react-native-ota-hot-update';
import ReactNativeBlobUtil from 'react-native-blob-util';


hotUpdate.downloadBundleUri(url, version, {
hotUpdate.downloadBundleUri(ReactNativeBlobUtil, url, version, {
updateSuccess: () => {
console.log('update success!');
},
Expand All @@ -102,14 +103,14 @@ The important thing: this library will control `version` by it self, need always

## Functions

| key | Return | Action | Parameters |
| ------------ |--------|------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------|
| downloadBundleUri | void | Download bundle and install it | (uri: string, version: number, option?: **UpdateOption**) |
| setupBundlePath | boolean | Install your bundle path if you control the downloading by your self, ignore that if you use `downloadBundleUri` | path: string, the path of bundlejs file that you downloaded before |
| removeUpdate | void | Remove you update and use the previos version | restartAfterRemoved?: boolean, restart to apply your changing |
| resetApp | void | Restart the app to apply the changing | empty |
| getCurrentVersion | number | Get the current version that let you use to compare and control the logic updating | empty |
| setCurrentVersion | boolean | Set the current version that let you use to compare and control the logic updating | version: number |
| key | Return | Action | Parameters |
| ------------ |--------|------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------|
| downloadBundleUri | void | Download bundle and install it | (downloadManager: **DownloadManager**, uri: string, version: number, option?: **UpdateOption**) |
| setupBundlePath | boolean | Install your bundle path if you control the downloading by your self, ignore that if you use `downloadBundleUri` | path: string, the path of bundlejs file that you downloaded before |
| removeUpdate | void | Remove you update and use the previos version | restartAfterRemoved?: boolean, restart to apply your changing |
| resetApp | void | Restart the app to apply the changing | empty |
| getCurrentVersion | number | Get the current version that let you use to compare and control the logic updating | empty |
| setCurrentVersion | boolean | Set the current version that let you use to compare and control the logic updating | version: number |


## UpdateOption
Expand All @@ -122,7 +123,9 @@ The important thing: this library will control `version` by it self, need always
| restartAfterInstall | No | boolean | default is `false`, if `true` will restart the app after install success to apply the new change |
| progress | No | void | A callback to show progress when downloading bundle |

## DownloadManager

The same method as `react-native-blob-util` or `rn-fetch-blob`

## License

Expand Down
21 changes: 12 additions & 9 deletions RNhotupdate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,10 @@ After you have done everything related to version manager, you just handle the w

```bash
import hotUpdate from 'react-native-ota-hot-update';
import ReactNativeBlobUtil from 'react-native-blob-util';


hotUpdate.downloadBundleUri(url, version, {
hotUpdate.downloadBundleUri(ReactNativeBlobUtil, url, version, {
updateSuccess: () => {
console.log('update success!');
},
Expand All @@ -102,14 +103,14 @@ The important thing: this library will control `version` by it self, need always

## Functions

| key | Return | Action | Parameters |
| ------------ |--------|------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------|
| downloadBundleUri | void | Download bundle and install it | (uri: string, version: number, option?: **UpdateOption**) |
| setupBundlePath | boolean | Install your bundle path if you control the downloading by your self, ignore that if you use `downloadBundleUri` | path: string, the path of bundlejs file that you downloaded before |
| removeUpdate | void | Remove you update and use the previos version | restartAfterRemoved?: boolean, restart to apply your changing |
| resetApp | void | Restart the app to apply the changing | empty |
| getCurrentVersion | number | Get the current version that let you use to compare and control the logic updating | empty |
| setCurrentVersion | boolean | Set the current version that let you use to compare and control the logic updating | version: number |
| key | Return | Action | Parameters |
| ------------ |--------|------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------|
| downloadBundleUri | void | Download bundle and install it | (downloadManager: **DownloadManager**, uri: string, version: number, option?: **UpdateOption**) |
| setupBundlePath | boolean | Install your bundle path if you control the downloading by your self, ignore that if you use `downloadBundleUri` | path: string, the path of bundlejs file that you downloaded before |
| removeUpdate | void | Remove you update and use the previos version | restartAfterRemoved?: boolean, restart to apply your changing |
| resetApp | void | Restart the app to apply the changing | empty |
| getCurrentVersion | number | Get the current version that let you use to compare and control the logic updating | empty |
| setCurrentVersion | boolean | Set the current version that let you use to compare and control the logic updating | version: number |


## UpdateOption
Expand All @@ -122,7 +123,9 @@ The important thing: this library will control `version` by it self, need always
| restartAfterInstall | No | boolean | default is `false`, if `true` will restart the app after install success to apply the new change |
| progress | No | void | A callback to show progress when downloading bundle |

## DownloadManager

The same method as `react-native-blob-util` or `rn-fetch-blob`

## License

Expand Down
3 changes: 1 addition & 2 deletions RNhotupdate/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-ota-hot-update",
"version": "1.0.8",
"version": "1.0.9",
"description": "Hot update for react native",
"main": "src/index",
"repository": "https://github.com/vantuan88291/react-native-ota-hot-update",
Expand All @@ -11,7 +11,6 @@
},
"homepage": "https://github.com/vantuan88291/react-native-ota-hot-update",
"peerDependencies": {
"react-native-blob-util": ">=0.19.11",
"react-native": ">=0.63.4"
},
"create-react-native-library": {
Expand Down
Loading

0 comments on commit 6dc7d1e

Please sign in to comment.