Install react-native-splash-screen
In your JS application you need to hide the splashscreen like so :
import SplashScreen from 'react-native-splash-screen';
// Do stuff and hide the splash when you want
SplashScreen.hide();
- Use a
.png
to preserve background transparency - 3000px as min height and/or width
- For cover splashscreens, preserve a 1/3 padding for important content to avoid clipping a Logo or Text
We offer 3 types of Splashcreen image resize modes:
- open your file
myProject.xcworkspace
in XCode - right-click on your project folder > "New file..." > "Launch Screen" > "Save as: SplashScreen"
react-native set-splash --path <path-to-image> --resize <[contain]|cover|center> --background "<background-color>"
⚠️ The path option is mandatory.
The background color defaults to white
- open your file
myProject.xcworkspace
in XCode - right-click on your project folder > "New file..." > "Launch Screen" > "Save as: SplashScreen"
react-native set-splash --platform ios --path <path-to-image>
react-native set-splash --platform android --path <path-to-image> --resize <[contain]|cover|center> --background ">background-color>"
⚠️ The path option is mandatory.