Open Gustavo067 opened 2 years ago
make sure you use real device for testing...this will not work on any emulator
@Gustavo067 did you find any solution to this issue?
I also ran into same error.And I checked it in real device by downloading the apk build.But it doesn't work.I am stuck in this issue.Can anyone help me? code.... inAppUpdates = async (deviceData) => {
const inAppUpdates = new SpInAppUpdates(
false // isDebug
);
inAppUpdates.checkNeedsUpdate({ curVersion: getVersion() }).then(async result => {
if (result.shouldUpdate) {
const response = await UserAPI.GetAppVersion(deviceData);
if(response !== undefined) {
if(response.error == true){
this.toast(response.message);
}else{
this.setState({isUpdate: response.data.force_update})
try{
this.openUpdateModel();
}catch(e){
console.log(e)
}
}
}else{
this.toast(Languages.ServerError);
}
}
});
}
When I click on the button to update it issues an error
Error: sp-react-native-in-app-updates checkNeedsUpdate error: Error: com.google.android.play.core.install.InstallException: Install Error(-3): The API is not available on this device.