Adding A Splash Screen And Icons To A Expo App In 5 Minutes
Even the smallest of the Details Matter for an app to be successful
What Are Splash Screen And Configurations Explanation
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 app is not immediately available. So, Splash screen is basically the screen that the user see while the app is in loading state.
What About the Device Sizes?
No Problem, Expo has got us covered.
“Incase 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 this 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)splash.backgroundColor
splash.resizeMode
What Are Icons And Configurations Explanation
When you publish your app, the app Icon is what people see on AppStore/Play stores and also on the user’s home screen.
Icon Size:
As suggested by the expo, we can use 1024x1024 on both android and ios devices. And also make sure the icon must be exactly square, i.e. a 1023x1024 icon is not valid.
Configuring the Icons for android
In Android, we have to do some extra configuration, rather than just specifying the icon in app.json
. You can about all those settings here and why we need them. Basically, you need to provide the 2 separate layers:
android.adaptiveIcon.foregroundImage
(generallyassets/adaptive-icon.png
)android.adaptiveIcon.backgroundImage
Again, Check about these 2 layers here.
Creating Icons and Splash Screen
I will be adding Icons and splash-screen to WhatsApp-Clone Project. For Creating the Icons use can use “Canva”, “AdobeXD” and so on. But I created it with the Figma template as told in expo docs. If you wanna know how to create icons here, see this video. But Below 👇 are the icons that I created with Figma.
Also, download the Icons here if you don't wanna go to Figma.
Replacing The Files And Reviewing The Entire App.json File
So, 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 assets/fsvicon.png
file cuz that is used for the web and our app is not for the web.
Also, Below 👇 is the whole App.json
file with all the configuration as told above:
Final OutPut
So, Easy right!…. That’s how easily you can add icons and a Splash screen to your app. If you need a tutorial for publishing or building an Expo App, Do comment. Hope you enjoyed this article and Till Then
Stay Safe; Stay Healthy