Closed washim-suuni closed 3 years ago
@abdollahzadehghalejoghi @SudoPlz
why versionCode is giving me 0.0 @abdollahzadehghalejoghi @SudoPlz @Gustash
{ versionCode: 0, totalBytes: 0, packageName: 'com.photo.gallery.galleryapp.lite', status: 0, updatePriority: 0, isFlexibleUpdateAllowed: false, isImmediateUpdateAllowed: false, updateAvailability: 1 } response of the library in release version
Thank you for your kind words sir ❤️ .
It sounds like you may need to use a custom customVersionComparator
.
Here's the default implementation of the version comparator https://github.com/SudoPlz/sp-react-native-in-app-updates/blob/c237de32571602c07f2dc8ce35f745edf00c70ed/lib/utils.js#L3-L20
Try passing your own comparator, and make sure store version is higher then the current one:
https://github.com/SudoPlz/sp-react-native-in-app-updates/blob/master/lib/index.android.js#L124-L125
why versionCode is giving me 0.0 @abdollahzadehghalejoghi @SudoPlz @Gustash Thanks Bro ❤️ If you want to use the default implementation of the version comparator،You must use meaningful versioning by default. or you need to use a custom customVersionComparator This article describes an example version implementation.
Hi pal , Still it's not working I will show you trash
On Thu, Jan 14, 2021, 8:27 PM Ioannis Kokkinidis notifications@github.com wrote:
Closed #14 https://github.com/SudoPlz/sp-react-native-in-app-updates/issues/14.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SudoPlz/sp-react-native-in-app-updates/issues/14#event-4206640222, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQYH3X7LJRBF276VHNB4DS3SZ4A7DANCNFSM4WAIEZCQ .
hi...you have done good work sir.... but can i know if my app which is in app store it's version code is 1 and version name is 1.0 now i want to make update via this beautiful library but when i follow this library method as i have give curversion 0.1 so i can get the update notification but as always i'm getting no need to update....i have tried so many times but i'm not getting success
this.inAppUpdates .checkNeedsUpdate({ curVersion: '0.1', }) .then(result => { console.log('result', result); if (result.shouldUpdate) { // this.props.navigation.navigate('Appupdate'); const updateType = UPDATE_TYPE.IMMEDIATE ; //doing this for force update so set it immediate this.inAppUpdates.startUpdate({ updateType, }); } else { alert('we dont need to hmm'); } }).catch(err => { console.log('error occurred while in app update', err); });