简体   繁体   中英

How to change default App Icon and Splash Screen in Ionic 4 application?

I'm developing Ionic 4 app with angular. But, I have stuck in how to change the default App Icon and Splash Screen. I've already go through the Ionic 4 documentation ( https://ionicframework.com/docs/native/splash-screen#usage ) but din't find any suitable solution yet. In StakOverflow I've found Lottie Splash Screen which is one kind of solution but not similar how Ionic default Splash screen works. So, do you have any suggestion how to overcome this issue.

I use ionic 3 and I think ionic 4 its the same , in your project folder , you have a resources directory, go in.
To change the default icon , just change the icon.png by your image, if I remember you need to resize your image (1024*1024).
To change the default splashscreen, its the same (2732*2732).
Don't forget to rename your image (icon.png and splash.png)

And after change, just update your project :

ionic cordova resources

The source image for icons should ideally be at least 1024×1024px and located at resources/icon.png. The source image for splash screens should ideally be at least 2732×2732px and located at resources/splash.png. If you used ionic start (run in your terminal within your app folder), there should already be default Ionic resources in the resources/ directory, which you can overwrite. ionic cordova resources (run in your terminal within your app folder) will automatically update your config.xml to reflect the changes in the generated images, which Cordova then configures.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM