@capacitor-community/app-icon
Advanced tools
Comparing version 4.1.1 to 5.0.0
{ | ||
"name": "@capacitor-community/app-icon", | ||
"version": "4.1.1", | ||
"version": "5.0.0", | ||
"description": "Capacitor community plugin for changing an iOS app icon.", | ||
@@ -35,6 +35,6 @@ "main": "dist/plugin.cjs.js", | ||
"devDependencies": { | ||
"@capacitor/core": "^5.0.0", | ||
"@capacitor/docgen": "^0.0.18", | ||
"@capacitor/ios": "^5.0.0", | ||
"@capacitor/android": "^5.0.0", | ||
"@capacitor/core": "^6.0.0", | ||
"@capacitor/docgen": "^0.2.2", | ||
"@capacitor/ios": "^6.0.0", | ||
"@capacitor/android": "^6.0.0", | ||
"@ionic/eslint-config": "^0.3.0", | ||
@@ -52,3 +52,3 @@ "@ionic/prettier-config": "^1.0.1", | ||
"peerDependencies": { | ||
"@capacitor/core": "^5.0.0" | ||
"@capacitor/core": "^6.0.0" | ||
}, | ||
@@ -55,0 +55,0 @@ "prettier": "@ionic/prettier-config", |
@@ -9,3 +9,3 @@ <p align="center"><br><img src="https://user-images.githubusercontent.com/236501/85893648-1c92e880-b7a8-11ea-926d-95355b8175c7.png" width="128" height="128" /></p> | ||
<p align="center"> | ||
<img src="https://img.shields.io/maintenance/yes/2023?style=flat-square" /> | ||
<img src="https://img.shields.io/maintenance/yes/2024?style=flat-square" /> | ||
<a href="https://www.npmjs.com/package/@capacitor-community/app-icon"><img src="https://img.shields.io/npm/l/@capacitor-community/app-icon?style=flat-square" /></a> | ||
@@ -93,50 +93,22 @@ <br> | ||
### Add Alternate Icons | ||
> Taken from https://www.youtube.com/watch?v=AT89ofYpWTU | ||
Add the alternate icons directly to your iOS project or in a subdirectory. | ||
### Create the alternate icons in assets catalog | ||
### Setup Info.plist | ||
In XCode go to Assets and create the App Icons. | ||
Then fill with images 1024x1024px | ||
Add the `CFBundleIcons` key to `Info.plist` with `CFBundleAlternateIcons` dictionary. Each alternate icon needs to be specified. | ||
 | ||
<img src="https://github.com/capacitor-community/app-icon/blob/main/media/xcode_project.png" width="500px" /> | ||
> The name of the asset should correspond to the name used in the code | ||
Providing every resolution for each alternative is not required. By including the icon with the highest supported resolution, iOS will handle the other resolutions by scalling down the large one provided. | ||
### Change build settings | ||
From Apple: | ||
1. Visit Build Settings | ||
2. Search For App icon, | ||
3. Select "yes" for `Include All App Icon Assets` | ||
4. Include a list (in `Alternate App Icon Sets`) with precise names of the app icons in the Assets Catalogue. | ||
> When specifying icon filenames, it is best to omit any filename extensions. Omitting the filename extension lets the system automatically detect high-resolution (@2x) versions of your image files using the standard-resolution image filename. If you include filename extensions, you must specify all image files (including the high-resolution variants) explicitly. The system looks for the icon files in the main resources directory of the bundle. | ||
 | ||
```xml | ||
<key>CFBundleIcons</key> | ||
<dict> | ||
<key>CFBundleAlternateIcons</key> | ||
<dict> | ||
<!-- The names to reference in your code --> | ||
<key>ionic-icon</key> | ||
<dict> | ||
<key>UIPrerenderedIcon</key> | ||
<true/> | ||
<key>CFBundleIconFiles</key> | ||
<array> | ||
<!-- Filenames--> | ||
<string>ionic-icon</string> | ||
</array> | ||
</dict> | ||
<!-- ... additional alternates if any ... --> | ||
</dict> | ||
</dict> | ||
``` | ||
### Supporting iPad | ||
For iPad specific version of an icon, there is an additional key to add in Info.plist. | ||
```xml | ||
<key>CFBundleIcons~ipad</key> | ||
<dict> | ||
<!-- same as above --> | ||
</dict> | ||
``` | ||
## Usage | ||
@@ -276,2 +248,3 @@ | ||
<td align="center" valign="top" width="14.28%"><a href="https://qliq.dev"><img src="https://avatars.githubusercontent.com/u/5783161?v=4?s=100" width="100px;" alt="QliQ.dev"/><br /><sub><b>QliQ.dev</b></sub></a><br /><a href="https://github.com/capacitor-community/app-icon/commits?author=qliqdev" title="Code">💻</a></td> | ||
<td align="center" valign="top" width="14.28%"><a href="https://hadouin.com"><img src="https://avatars.githubusercontent.com/u/79368202?v=4?s=100" width="100px;" alt="Hadouin"/><br /><sub><b>Hadouin</b></sub></a><br /><a href="https://github.com/capacitor-community/app-icon/commits?author=hadouin" title="Documentation">📖</a></td> | ||
</tr> | ||
@@ -278,0 +251,0 @@ </tbody> |
Sorry, the diff of this file is not supported yet
41113
257