[ios] Standalone apps - Serve the proper js bundle based on publish time
See original GitHub issueIPA’s always prefer loading the cached js bundle over the embedded one. However, there are cases when this is not correct. For example, if you upload a new IPA with a newer embedded bundle than what is originally cached on a user’s phone, the old cache version will be preferred over the newer embedded version.
Relevant parts from someone experiencing this on forums:
Reproducing issue
For example, I have two builds:
SDK version | Build version | Embedded JS version |
---|---|---|
v25.0.0 | 1.3.9 | 1.3.9 |
v27.0.0 | 1.4.5 | 1.4.5 |
Then, do the followings:
- Install v1.3.9 in TestFlight
- Open it, showing version 1.3.9
- Update to app with build version 1.4.5 in TestFlight
- Open it, still showing version 1.3.9
- (which is not even in the same channel, of the same SDK version)
- Close app, reopen, showing version 1.4.5
- (not downloaded remotely because I have set
"checkAutomatically": "ON_ERROR_RECOVERY"
)
- (not downloaded remotely because I have set
Btw, this happens on ios AND android.
Build procedure
I am building a standalone each time with following precedures:
# Publish updates
exp publish --release-channel prod-v4
# Build apps
exp build:ios --release-channel prod-v4 --no-publish # --no-publish will use the most recent published release
exp build:android --release-channel prod-v4 --no-publish
Investigation direction
Can you guys have a check on the logics of choosing js version in standalones?
The updated standalone may be using the JS cache in local storage, but using embedded JS should be prior to using the JS cache.
Full thread: https://forums.expo.io/t/updating-standalone-always-use-old-js-bundle-at-first-launch/9457/7
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:10 (6 by maintainers)
I think our issue was happening because we weren’t incrementing the app version in the app.json (we were only incrementing the build versions for Android and iOS which are required to upload to the stores). Incrementing the app version fixed the issue.
We’ve had the same issue the last 2 releases using sdk27. Deployed apps are opening with old release versions despite
exp:publish:history --platform android
showing the most recent build. Maybe it’s due to having different release channels for different platforms - we’re going to try not using release channels for our next build to hopefully fix it.