I really like Expo, but sometimes I find myself going down endless GitHub rabbit holes trying to fix simple things.
In this case, I changed the splash splash image in an Expo app I was working on and ran into a very annoying issue: the old splash image (which was deleted) continued to show briefly when the app was launched before suddenly changing to the new image.
According to Expo Docs - this can sometimes happen with SDK 51 and below because in iOS development builds, launch screens can sometimes remain cached between builds.
The problem was that I was not on SDK 51. I was on SDK 53. Either way, I tried the suggestion of running npx expo run:ios --no-build-cache to fix the issue…and it didn’t work. But it was worth a try.
After browsing through a bunch of GitHub threads, I noticed that a few others who experienced the same issue were able to resolve it by running npx expo prebuild.
The first time I ran this, I got a failure on Android: Could not find MIME for Buffer <null>.
This cryptic error went away if I commented out the “expo-splash-screen” plugin configuration in the app config. Strangely, once I commented it back in and ran prebuild again…the error didn’t happen and a different error emerged:
withIosSplashScreenStoryboardBaseMod: Cannot create property 'constraint' on string ''
More searching lead me to this comment: https://github.com/expo/expo/pull/32858#issuecomment-2476515215
Did you try running
prebuild
with--clean
? If you don't, you may run into problems where it looks at your existing storyboard and tries to modify it but this has changed in the sdk 52 template.
Did i try running with - -clean? No, I did not. So I gave it a shot and it worked. No errors and all the issues went away. I saw the correct splash screen when launching the app on device.
Closing Thoughts:
I really like Expo and React Native. Cross platform frameworks allow me to build mobile apps for iOS and Android using a single codebase and when everything is working, the dev loop and iteration speed is best in class. It’s easy to get into flow and make progress quickly.
BUT…spending so much time debugging why a simple splash screen image change is not working really hurts the overall experience. These kinds of issues just don’t exist with pure native tools (XCode/Swift, Android Studio/Kotlin). Yes, I need to write and maintain two codebases, but if I change an image and re-run my app, the change just works. I hope the same experience can make it’s way into Expo too.