Switching users from automatic Updates to user triggered event could cause bricking?

Currently users run my app where app.json does not specify updates – Per your docs, this means they are receiving automatic exp publish updates on first app load every time.

So:

  • Let’s say I have app Version1 and exp publish called Publish1

  • Let’s say I exp build a new standalone app (lets call it Version2) to disable automatic updates:

        "updates": {
            "checkAutomatically": "ON_ERROR_RECOVERY",
            "fallbackToCacheTimeout": 0
        },

And add custom logic to present a user option to Updates.reload()

  • I then exp publish Publish2

  • When the user downloads this Version2, according to the docs and answers from Slack, the app:

      1. Will read the new app.json first and
      1. Still loads from Expo’s last exp publish

In that case, does this mean I have “bricked” my users into the last exp publish Publish1? And therefore they will never be prompted for the new Publish2 which contains the Updates.reload code?

Hi @ericjames . Note that a “version” of your app consists of both the JS bundle and the app.json at the time of publish. What will happen in this case is:

  1. The user will launch the app, it will immediately load the most recently cached version (Publish1). Since Publish1 has the default updates config in app.json, it will then asynchronously ask the server for the newest version of the app it can run. If you haven’t updated the SDK version between Publish1 and Publish2, the server will send back Publish2.

  2. The next time the user launches the app, it will immediately load the most recently cached version, which is now Publish2. Since Publish2 contains the new updates config that disables automatic updates, the app will not automatically ask the server for any further updates; however, Publish2 will be running so your code can ask for updates manually.

Hope that helps!

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