You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently started to use it and I'm receiving this error in Sentry, which made me think if the code in docs and example project shouldn't be changed to something like that:
inAppUpdates.checkNeedsUpdate().then((result) => {
if (result.shouldUpdate) {
let updateOptions = {};
if (Platform.OS === 'android') {
if (result.isFlexibleUpdateAllowed) {
updateOptions = {
updateType: IAUUpdateKind.FLEXIBLE,
};
inAppUpdates.startUpdate(updateOptions);
}
} else {
inAppUpdates.startUpdate(updateOptions);
}
}
});
The text was updated successfully, but these errors were encountered:
If flexible is not allowed, that's probably because updating is not allowed in general (for various reasons) - since flexible seems like the default way of handling updates and there aren't any other fallbacks.
I don't know if it makes sense to stop the error that would show up upon startUpdate by checking isFlexibleUpdateAllowed, that's why it wasn't mentioned in the docs.
As you mentioned, as this library is just a wrapper around Google In App Updates API, throwing this error shouldn't be part of the normal usage flow in my understanding. If I previously know that the update it's not allowed, why call startUpdate and throw an error that could be avoided?
Hello, thank you for your work in this library.
I recently started to use it and I'm receiving this error in Sentry, which made me think if the code in docs and example project shouldn't be changed to something like that:
The text was updated successfully, but these errors were encountered: