Search code examples
react-nativecode-push

React Native + CodePush: Do updates only appear the 2nd time the app has been loaded?


I have an app already in production on the app store. I just pushed an important bug fix through code push without going through the app store.

However, from my knowledge the user has to first open the app, fetch the updated code, and only on the 2nd time that the app is started will the update take effect. Is this true? If so, does that mean I should still try pushing a new version through the app store?


Solution

  • If you released via Code Push using the { installMode: InstallMode.IMMEDIATE } parameter, the patch is applied instantly without app restart.

    The user will see a white flash in the app when the patch is applied, and then the app is resumed.

    https://microsoft.github.io/code-push/docs/tutorials.html

    If an update is available, it will be silently downloaded, and installed the next time the app is restarted (either explicitly by the end user or by the OS). However, developers can modify the install behavior if they so choose, by leveraging the installMode parameter:

    IMMEDIATE: The update will be applied to the running application immediately. The application will be reloaded with the new content immediately.

    ...