Abort an Updates.fetchUpdateAsync() after a certain time

Please provide the following:

  1. SDK Version: 46
  2. Platforms(Android/iOS/web/all): Android/iOS

Hello everyone, I want to programmatically check for new updates, without using the fallbackToCacheTimeout in app.json that will trigger the check of the new updates when the application is launched because like that I can’t put a custom loading page.
So by doing this all by code as follow :

try{
      const update = await Updates.checkForUpdateAsync();
      if(update.isAvailable){
          await Updates.fetchUpdateAsync();
          await Updates.reloadAsync();
      }else{}
}catch(err){}

But I want to be able to abort all those calls after a certain time (thus, the user that have a bad connection can use the app without waiting a very long time).
I check the documentation and I cannot found any method that allow this.

I dont’t think it’s possible to cancel a Promise for now in Javascript, or maybe any connection ?

Or does the “fallbackToCacheTimeout” value in the app.json will automatically apply to the fetch updates call of the Expo API?

Do someone have any idea how to do it ? :sob:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.