CodePush defaults

15 Feb 2018

By default CodePush will check for updates (codePush.CheckFrequency) whenever the app’s process is started(reference):


By default CodePush will install updates (codePush.InstallMode) whenever the app is restarted (either by the user or the OS):


This means that if a user constantly keeps your app in the background and never restarts their phone nor the app then it may be a long time before they receive the updates. Therefore, I think a better default is to check for updates every time your app resumes to the foreground from the background, and install any updates (if present) on resume also:

checkFrequency: codePush.CheckFrequency.ON_APP_RESUME, installMode: codePush.InstallMode.ON_NEXT_RESUME

MS docs on defaults:

Sample code: