sp-react-native-in-app-updates
sp-react-native-in-app-updates copied to clipboard
when in app updates finished, Update not applied after restart
my app version 2.2.3
playstore version 2.3.0
in this case,
it looks like in-app updates works fine but when update finished and restart app, app version is still 2.2.3
how can i fix it?
Bump!
Facing same issue here. In app drawer I am displaying app version using DeviceInfo.getVersion(). When app is updated via this library, I close the app and start it again and in app drawer I still see old version. No further app updates are available at this point.
I found that calling installUpdate is important after download is complete. You have to start a listener and once app updates are downloaded you have trigger install function to install the update.
inAppUpdates.addStatusUpdateListener(downloadStatus => {
console.log('download status', downloadStatus);
if (downloadStatus.status === IAUInstallStatus.DOWNLOADED) {
console.log('downloaded');
inAppUpdates.installUpdate();
inAppUpdates.removeStatusUpdateListener(finalStatus => {
console.log('final status', finalStatus);
});
}
});
inAppUpdates.startUpdate(updateOptions);
During installation, I am always getting a status: 5 (i.e installation failed)! Is anyone facing the same issue?
Did you find out any solution for status: 5 issue?
You cannot test the InAppUpdates without uploading it to Internal App Sharing or releasing it to production. If you use adb, you'll find the app signing fails somewhere that is why app update is not installed.
Read the internal app sharing part at the end of the documentation. It is very easy and you can test that way very easily.
same issue for me
I found that calling installUpdate is important after download is complete. You have to start a listener and once app updates are downloaded you have trigger install function to install the update.
inAppUpdates.addStatusUpdateListener(downloadStatus => { console.log('download status', downloadStatus); if (downloadStatus.status === IAUInstallStatus.DOWNLOADED) { console.log('downloaded'); inAppUpdates.installUpdate(); inAppUpdates.removeStatusUpdateListener(finalStatus => { console.log('final status', finalStatus); }); } }); inAppUpdates.startUpdate(updateOptions);
Thanks @devWaleed for the code snippet.
I was just wondering if the following simple approach would work ?
inAppUpdates.startUpdate(updateOptions)
.then(inAppUpdates.installUpdate)
still got stuck instaling from google play even trying with @devWaleed
I found that calling installUpdate is important after download is complete. You have to start a listener and once app updates are downloaded you have trigger install function to install the update.
inAppUpdates.addStatusUpdateListener(downloadStatus => { console.log('download status', downloadStatus); if (downloadStatus.status === IAUInstallStatus.DOWNLOADED) { console.log('downloaded'); inAppUpdates.installUpdate(); inAppUpdates.removeStatusUpdateListener(finalStatus => { console.log('final status', finalStatus); }); } }); inAppUpdates.startUpdate(updateOptions);