[SDK 52] Splash screen image scaled very small on development builds
Problem
Minimal reproducible example https://github.com/expo/expo/tree/main/templates/expo-template-default What platform(s) does this occur on? Android, iOS Where did you reproduce the issue? in a development build Summary Splash screen image is scaled very small on iOS development builds, but not Expo Go. Using default template via `npx create-expo-app@latest --template default@beta` and run dev build via: `npx expo prebuild --clean --platform ios && npx expo run:ios` Screenshots to compare: Development build: Expo Go: Environment [code block] Expo Doctor Diagnostics [code block]
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Fix Splash Screen Image Scaling in iOS Development Builds
The splash screen image is not being properly sized in iOS development builds due to incorrect configuration in the `app.json` or `app.config.js` file. This often happens when the image dimensions do not match the expected sizes for iOS splash screens, leading to scaling issues.
Awaiting Verification
Be the first to verify this fix
- 1
Check Image Dimensions
Ensure that the splash screen image is of the correct dimensions for iOS. The recommended size for the splash screen image is 1242x2688 pixels for iPhone X and later. If the image is smaller, it will scale down incorrectly.
N/AN/A - 2
Update app.json Configuration
Modify the `app.json` or `app.config.js` file to specify the correct splash screen configuration. Ensure that the `splash` object includes the correct image path and resizeMode set to 'contain'.
json{ "expo": { "splash": { "image": "./assets/splash.png", "resizeMode": "contain", "backgroundColor": "#ffffff" } } } - 3
Rebuild the iOS Development Build
After making changes to the splash screen configuration, rebuild the iOS development build to apply the changes. Use the following commands to clean and rebuild the project.
bashnpx expo prebuild --clean --platform ios && npx expo run:ios - 4
Test the Development Build
Run the newly built iOS development app on a simulator or physical device to verify that the splash screen image is displayed correctly and not scaled down.
N/AN/A
Validation
Confirm that the splash screen image appears at the correct size and is not scaled down when launching the app. Compare the splash screen in the development build with the one in Expo Go to ensure consistency.
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep