Ionic
With Cordova, you can directly set your own icons without modifying the default image.
1. Create a folder in your root directory, such as icons.
2. Then, create an iOS folder under the icons folder to store the desired image, that is, the image you need in the config. xml file below.
The folder structure is as follows:
2. Write down the settings in config. xml under the root directory.
Note: The following path is relative to your directory, that is, the path is relative to your project.
1 <platform name="ios"> 2 3 <!-- iOS 7.0+ --> 4 <!-- iPhone / iPod Touch --> 5 <icon src="icons/ios/icon-60.png" width="60" height="60" /> 6 <icon src="icons/ios/[email protected]" width="120" height="120" /> 7 8 <!-- iPad --> 9 <icon src="icons/ios/icon-76.png" width="76" height="76" />10 <icon src="icons/ios/[email protected]" width="152" height="152" />11 12 <!-- iOS 6.1 -->13 <!-- Spotlight Icon -->14 <icon src="icons/ios/icon-40.png" width="40" height="40" />15 <icon src="icons/ios/[email protected]" width="80" height="80" />16 17 <!-- iPhone / iPod Touch -->18 <icon src="icons/ios/icon.png" width="57" height="57" />19 <icon src="icons/ios/[email protected]" width="114" height="114" />20 21 <!-- iPad -->22 <icon src="icons/ios/icon-72.png" width="72" height="72" />23 <icon src="icons/ios/[email protected]" width="144" height="144" />24 25 <!-- iPhone Spotlight and Settings Icon -->26 <icon src="icons/ios/icon-small.png" width="29" height="29" />27 <icon src="icons/ios/[email protected]" width="58" height="58" />28 29 <!-- iPad Spotlight and Settings Icon -->30 <icon src="icons/ios/icon-50.png" width="50" height="50" />31 <icon src="icons/ios/[email protected]" width="100" height="100" />32 </platform>
3. Return to your terminal
Input
ionic build ios
4. The above is the same for iOS android...
<platform name="android"> <icon src="myIcon.png"/></platform>
You can select any path,
5. The same is true for splash, but the icon is changed to splash.
For example
1 <platform name="ios">2 <splash src="iphone/splash-default.png" width="2048" height="1536"/>3 </platform>
If the size of the splash image here is appropriate, it will replaceRootproj/platforms/IOS/hellocordova/resources/splash) UnderDefault~iphone.png
Ionic icons and splash