Detect whether auto-update check is complete

Hi,

When a user installs and opens a Cordova app that has a pending update for the first time, he can start using the app and then be interrupted by a reload.

This is a bad user experience, and I’m a bit worried that Apple or Google reviewers will also complain about this.

I would prefer to show a wait screen while I check to see if there is a pending update. Does anyone know how to do this?

I found

Autoupdate.newClientAvailable()

but I need something like

Autoupdate.newClientCheckComplete()

which doesn’t exist.

Looking at the code for the autoupdate package, it seems you would need to make code changes to it to achieve this. Is there a simpler way?

Thanks,
G

1 Like

Hi, in Quave apps we use this package GitHub - quavedev/reloader: More control over hot code push reloading for your production apps. Designed to replace mdg:reload-on-resume and provide a more production-ready approach. to give us full control.

In the main Readme there is a full example with React.

Feel free to ask follow up questions.

Thanks, I’m now using that package and it works quite well.

I couldn’t get the “launchScreenDelay” setting to work though: even if I set it to 10s, I still get a flash of the old app on startup. This was when using a dev build (“meteor run”), I didn’t try a prod build.

Assuming it was working, then I would be delaying the opening of the app every time, even when there are no updates available, right? I guess there’s no way around that?

Thanks,
G

Yes. I don’t recommend this approach but it is available.