What is a Splash Screen
You have made a great app and of course, why not publish it right? But if you open your expo app and see the default boring splash screen provided by Expo, you ……… “Wait, What’s a Splash screen first of all?”
Seeing the Image above you would have probably got an idea of what I am talking about.
Basically, when we start an app, It requires some time to run or load the fonts/assets and the app is not immediately available. So, a splash screen is basically the screen that the user sees while the app is in a loading state.
What About the Device Sizes?
No Problem, Expo has got us covered. In the case of iOS devices, we can go with 1242 pixels wide and 2436 pixels tall — this is the width of the iPhone 8 Plus (the widest iPhone) and the height of the iPhone X (the tallest iPhone). But In the case of Android, screen sizes vary greatly with the massive variety of devices on the market. One strategy to deal with this is to look at the most common resolutions and design around that — you can see a list of devices and their resolutions here. You can see the expo doc where I have copied the above info
Configuring the Splash Screen
You can configure your splash screen in the app.json file and read about all the properties from the expo guide below:
- splash.image (Note: Splash screen image has no background)
When you publish your app, the app icon is what people see on the App Store/Play Store and also on the user’s home screen.
As suggested by Expo, we can use 1024×1024 on both Android and iOS devices. And also make sure the icon must be exactly square, i.e. a 1023×1024 icon is not valid.
Configuring the Icons for Android
In Android, we have to do some extra configuration beyond specifying the icon in app.json. You can learn more about all those settings here and why we need them. Basically, you need to provide the 2 separate layers:
android.adaptiveIcon.foregroundImage (generally assets/adaptive-icon.png )
Again, read more about these 2 layers here.
Creating Icons and Splash Screen
I will be adding Icons and splash-screen to the WhatsApp-Clone Project. For Creating the icons, you can use “Canva”, “AdobeXD” and so on. But I created it with the Figma template as explained in the expo docs. If you wanna know how to create icons, see this video. But Below are the icons that I created with Figma.
See the icon I created in Figma above. Also, download the Icons here if you don’t want to go to Figma.
Replacing the Files and Reviewing the Entire App.json File
After downloading the assets, just go to your project assets folder and replace the 3 files which I have highlighted. The files you download would be named automatically to their specific name so NO WORRIES! Delete the old files if you want. You could also delete the assets/favicon.png file because that is used for the web and our app is not for the web.