Google in-app updates support for react-native. Specially created for android only. After installing plugin user will get android app update popup if there is any update available on play store.
$ npm install react-native-rn-in-app-update --save
$ react-native link react-native-rn-in-app-update
only react-native link require
It will auto linked after installing package
No native implementation for ios. If project show missing pod error then perform following step:
cd ios && pod install
...
...
import com.logicwind.inappupdate.InAppUpdateUtils; // add this
// Create object :
private InAppUpdateUtils appUpdateUtils;
@Override
protected void onCreate(Bundle savedInstanceState) {
...
...
appUpdateUtils = new InAppUpdateUtils(this); // add this
appUpdateUtils.initAppUpdaterAndCheckForUpdate(); // add this
appUpdateUtils.registerListener(); // add this
}
// Add below method also
@Override
protected void onResume() {
super.onResume();
appUpdateUtils.ifUpdateDownloadedThenInstall();
}
// Add below method also
@Override
protected void onDestroy() {
super.onDestroy();
appUpdateUtils.unregisterListener();
}
Please find testing instruction here
This project is licensed under the MIT License - see the LICENSE.md file for details