0.0.11 • Published 1 year ago
react-native-air-update v0.0.11
React Native Module for AirUpdate BETA
This plugin helps you connect AirUpdate to your React Native apps, so you can easily add exciting updates.
Features
Instead of sending the entire Molecule, sends only the ATOM, resulting in a significantly reduced download size.
Prioritized security as a necessity.
Getting Started
npm install --save react-native-air-update
Steps
Add following code in start of react-native
import AirUpdate from 'react-native-air-update'; useEffect(() => { AirUpdate.sync({ bundleId: 'com.test', appVersion: '1.0.0', isUpdateAvailable //OPTIONAL }); }, []); AirUpdate.updateApp() // TO UPDATE APP
Add following code in settings.gradle
include ':app', ':react-native-air-update' project(':react-native-air-update').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-air-update/android')
Add following code in MainApplication.kt
import com.airupdate.AirUpdate; override fun getJSBundleFile(): String? = AirUpdate(applicationContext).getJSBundleFile()
Add following line in package.json script :
"airUpdateAndroid": "source ./node_modules/react-native-air-update/airupdate-release.sh android"
Create .env file
APP_VERSION=1.0.0 BUNDLE_ID=com.test