Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue: Old Bundle Used After App Update from App Store/Google Play #13

Open
vantuan88291 opened this issue Dec 26, 2024 · 2 comments
Open

Comments

@vantuan88291
Copy link
Owner

Issue: Old Bundle Used After App Update from App Store/Google Play

Scenario:

  1. The app is released with version 1.0.0.
  2. Users of version 1.0.0 receive an Over-the-Air (OTA) update, which delivers a new bundle.
  3. A new app version 1.0.1 is built and released to the App Store/Google Play without any OTA update. The default bundle embedded in version 1.0.1 is newer than the OTA bundle from version 1.0.0.

Problem:

When a user updates the app from version 1.0.0 to 1.0.1 via the App Store or Google Play:

  • The app continues to use the old OTA bundle from version 1.0.0 that was downloaded previously.
  • The default bundle embedded in version 1.0.1, which is newer than the old OTA bundle, is not used.
  • This issue does not occur for users downloading version 1.0.1 for the first time, as they start with the default bundle of version 1.0.1.

Expected Behavior:

When a user updates the app from version 1.0.0 to 1.0.1, the app should:

  • Use the default bundle of version 1.0.1 if it is newer than the cached OTA bundle of version 1.0.0.
  • Alternatively, use the latest OTA bundle of version 1.0.1 if available.

Temporary Solution:

Before releasing version 1.0.1 to the App Store or Google Play:

  1. Publish the OTA update for version 1.0.1.
  2. When the user updates to version 1.0.1 and opens the app, it will download the new OTA bundle for 1.0.1, ensuring they are using the latest version.

Assumption api design like this:

  • Design the OTA API to filter bundles based on the app version (e.g., 1.0.0, 1.0.1). The app should only receive OTA updates compatible with its specific version.
@vantuan88291
Copy link
Owner Author

I will fix that issue and inform here

@vantuan88291
Copy link
Owner Author

vantuan88291 commented Dec 26, 2024

Solution:

  1. get current version name of the app, eg: 1.0.1
  2. Save it in local storage after install new bundle
  3. At get bundleJS file method, will check current version name with version name at local storage
  4. if It different then use default bundle, otherwise use the bundle downloaded

PR: #14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant