Skip to content

Commit aba7056

Browse files
authored
doc(android|ios): update app icon (#1410)
* doc(ios): refactor app icons * doc(android): refactor app icons * doc: refactor app icons
1 parent b56a29e commit aba7056

File tree

1 file changed

+49
-42
lines changed

1 file changed

+49
-42
lines changed

Diff for: www/docs/en/dev/config_ref/images.md

+49-42
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,11 @@ width | *Optional* <br/> Icon width in pixels
4545
height | *Optional* <br/> Icon height in pixels
4646
target | *Optional* <br/> {% cdv_platform electron %} <br/> Set target to supply unique icons for `app` and `installer`
4747

48-
The following configuration can be used to define a single default icon
49-
which will be used for all platforms.
50-
```xml
51-
<icon src="res/icon.png" />
52-
```
53-
For each platform, you can also define a pixel-perfect icon set to fit
54-
different screen resolutions.
55-
5648
## Android
5749

58-
Instead of using a single image for an icon, you can use two images (background and foreground) to create an **Adaptive Icon**. To use Adaptive Icons in Cordova, at minimum **Cordova CLI** 9.0.0 and **Cordova-Android** 8.0.0 is required.
50+
Android's **Adaptive Icons** feature enables you to create separate foreground and background layers for your App Icons. To use Adaptive Icons in Cordova, you need at least **Cordova CLI** 9.0.0 and **Cordova-Android** 8.0.0.
5951

60-
Android 13 has introduced themed icons which are monochrome images appended to the existing **Adaptive Icons**. To use Themed Icon in Cordova, at minimum **Cordova CLI** 12.0.0 and **Cordova-Android** 12.0.0 is required.
52+
With Android 13, Google introduced **Themed Icons**, which are monochrome variations of **Adaptive Icons** that integrate seamlessly with the system's color scheme. To use **Themed Icons** in Cordova, you'll need at least **Cordova CLI** 12.0.0 and **Cordova-Android** 12.0.0.
6153

6254
Attributes | Description
6355
--------------|--------------------------------------------------------------------------------
@@ -71,6 +63,7 @@ density | *Required* <br/> Specified icon density
7163
To use the adaptive icons the `background`, `foreground` and optionally `monochrome` attributes must be defined in place of the `src` attribute. The `src` attribute is not used for adaptive icons.
7264

7365
#### Adaptive Icon with Images:
66+
7467
```xml
7568
<platform name="android">
7669
<icon monochrome="res/icon/android/ldpi-monochrome.png" background="res/icon/android/ldpi-background.png" density="ldpi" foreground="res/icon/android/ldpi-foreground.png" />
@@ -85,6 +78,7 @@ To use the adaptive icons the `background`, `foreground` and optionally `monochr
8578
**Note:** In this example, the foreground image will also be used as the fallback icon for Android devices that do not support the adaptive icons. The fallback icon can be overridden by setting the src attribute.
8679

8780
#### Adaptive Icon with Vectors:
81+
8882
```xml
8983
<platform name="android">
9084
<icon monochrome="res/icon/android/ldpi-monochrome.png" background="res/icon/android/ldpi-background.xml" density="ldpi" foreground="res/icon/android/ldpi-foreground.xml" src="res/android/ldpi.png" />
@@ -99,6 +93,7 @@ To use the adaptive icons the `background`, `foreground` and optionally `monochr
9993
**Note:** In this example, the src attribute must be defined when then foreground attribute is defined with a vector or color.
10094

10195
#### Adaptive Icon with Colors:
96+
10297
Create a `res/values/colors.xml` resource file in your project directory to store the app's color definitions.
10398
```xml
10499
<?xml version="1.0" encoding="utf-8"?>
@@ -143,7 +138,8 @@ In the `config.xml`, we will add `resource-file` to copy the `colors.xml` into t
143138
</platform>
144139
```
145140

146-
### See Also
141+
**See Also:**
142+
147143
- [Android icon guide](https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive)
148144
- [Android Adaptive icons - User theming](https://developer.android.com/develop/ui/views/launch/icon_design_adaptive#user-theming)
149145
- [Android - Supporting multiple screens](https://developer.android.com/guide/practices/screens_support.html)
@@ -152,43 +148,54 @@ In the `config.xml`, we will add `resource-file` to copy the `colors.xml` into t
152148
Icons are not applicable to the Browser platform.
153149

154150
## iOS
151+
155152
```xml
156153
<platform name="ios">
157-
<!-- iOS 8.0+ -->
158-
<!-- iPhone 6 Plus -->
159-
<icon src="res/ios/[email protected]" width="180" height="180" />
160-
<!-- iOS 7.0+ -->
161-
<!-- iPhone / iPod Touch -->
162-
<icon src="res/ios/icon-60.png" width="60" height="60" />
163-
<icon src="res/ios/[email protected]" width="120" height="120" />
164-
<!-- iPad -->
165-
<icon src="res/ios/icon-76.png" width="76" height="76" />
166-
<icon src="res/ios/[email protected]" width="152" height="152" />
167-
<!-- Spotlight Icon -->
168-
<icon src="res/ios/icon-40.png" width="40" height="40" />
154+
<!-- Notifications on iPhone, iPad Pro, iPad, iPad mini -->
155+
<icon src="res/ios/[email protected]" width="76" height="76" />
156+
<icon src="res/ios/[email protected]" width="114" height="114" />
157+
158+
<!-- Settings on iPhone, iPad Pro, iPad, iPad mini -->
159+
<icon src="res/ios/[email protected]" width="29" height="29" />
160+
<icon src="res/ios/[email protected]" width="58" height="58" />
161+
<icon src="res/ios/[email protected]" width="87" height="87" />
162+
163+
<!-- Spotlight on iPhone, iPad Pro, iPad, iPad mini -->
164+
<icon src="res/ios/[email protected]" width="40" height="40" />
169165
<icon src="res/ios/[email protected]" width="80" height="80" />
170-
<!-- iOS 6.1 -->
171-
<!-- iPhone / iPod Touch -->
172-
<icon src="res/ios/icon.png" width="57" height="57" />
173-
<icon src="res/ios/[email protected]" width="114" height="114" />
174-
<!-- iPad -->
175-
<icon src="res/ios/icon-72.png" width="72" height="72" />
176-
<icon src="res/ios/[email protected]" width="144" height="144" />
177-
<!-- iPad Pro -->
178-
<icon src="res/ios/icon-167.png" width="167" height="167" />
179-
<!-- iPhone Spotlight and Settings Icon -->
180-
<icon src="res/ios/icon-small.png" width="29" height="29" />
181-
<icon src="res/ios/[email protected]" width="58" height="58" />
182-
<icon src="res/ios/[email protected]" width="87" height="87" />
183-
<!-- iPad Spotlight and Settings Icon -->
184-
<icon src="res/ios/icon-50.png" width="50" height="50" />
185-
<icon src="res/ios/[email protected]" width="100" height="100" />
186-
<!-- iTunes Marketing Image -->
166+
167+
<!-- Home Screen on iPad, iPad mini -->
168+
<icon src="res/ios/[email protected]" width="152" height="152" />
169+
170+
<!-- Home Screen on iPad Pro -->
171+
<icon src="res/ios/[email protected]" width="167" height="167" />
172+
173+
<!-- Home Screen on iPhone -->
174+
<icon src="res/ios/[email protected]" width="60" height="60" />
175+
<icon src="res/ios/[email protected]" width="120" height="120" />
176+
<icon src="res/ios/[email protected]" width="180" height="180" />
177+
178+
<!-- macOS app icons -->
179+
<icon src="res/ios/icon-16.png" width="16" height="16" />
180+
<icon src="res/ios/icon-32.png" width="32" height="32" />
181+
<icon src="res/ios/icon-64.png" width="64" height="64" />
182+
<icon src="res/ios/icon-128.png" width="128" height="128" />
183+
<icon src="res/ios/icon-256.png" width="256" height="256" />
184+
<icon src="res/ios/icon-512.png" width="512" height="512" />
185+
186+
<!-- App Store Icon and another macOS app icons -->
187187
<icon src="res/ios/icon-1024.png" width="1024" height="1024" />
188188
</platform>
189189
```
190-
### See Also
191-
- [App Icons on iPad and iPhone](https://developer.apple.com/library/content/qa/qa1686/_index.html)
190+
191+
**Notes:**
192+
193+
- Alpha channel is not supported for any iOS icons.
194+
195+
**References:**
196+
197+
- [Apple Developer - Configuring your app icon](https://developer.apple.com/documentation/xcode/configuring-your-app-icon/)
198+
- [Apple Developer - Human Interface Guidelines > App icons](https://developer.apple.com/design/human-interface-guidelines/app-icons)
192199

193200
[splashscreen_plugin]: ../reference/cordova-plugin-splashscreen/
194201

0 commit comments

Comments
 (0)