I’m building a mobile app (iOS & Android) with React Native.
Because I use native modules (e.g. Mapbox, OneSignal), I don’t use Expo Go — instead I build locally with EAS.
Problem
When I publish a new build, the version I get on TestFlight shows old code (UI elements that no longer exist in my codebase, from build 16 or 17).
Details
I have bash build & submit scripts with auto-increment build numbers (so I’m sure they’re correct).
iOS build command:
eas build --platform ios --profile staging --localI’ve already tried --clear-cache and also expo prebuild.
To submit to TestFlight:
eas submit --platform ios --profile staging --path <path.ipa>On Android, one colleague once saw the same issue (old version showing), but most of the time it seems specific to iOS/TestFlight.
Locally (Metro dev server / simulator), the app always runs with the latest code.
So it looks like the IPA built with EAS contains (or downloads) an old JS bundle.
- Has anyone already faced this kind of issue with EAS build + React Native?
- How can I ensure that the IPA always contains the latest JS bundle instead of an old one?
Thanks you !
1 Answer 1
I haven't particularly experienced this. The --clear-cache might not work because it primarily clears dependency caches, but the JavaScript bundling cache might be sperate. Try
- Force CLean Runtime Version Calculation - explicitly set a new runtime version in your build profile
{
"build": {
"staging": {
"ios": {
"runtimeVersion": "1.0.0"
}
}
}
}
Increment the runtime version for each build where you want to force fresh bundling
OR Disable Eager Bundling Temporarily - try
export EAS_BUILD_DISABLE_BUNDLE_JAVASCRIPT_STEP=1
eas build --platform ios --profile staging --local
1 Comment
Explore related questions
See similar questions with these tags.