ionic-team / ionic-team/capacitor-assets
(possible bug) Some Android Ionic template resources are never generated
- Dominant language
- TypeScript
- Stars
- 583
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
Description
no matter what I try, I _cannot_ get `npx capacitor-assets generate --android --ios` to generate the following files from the assets I provide:
* `android/app/src/main/res/drawable/splash.png`
* `android/app/src/main/res/drawable/ic_launcher_background.xml`
* `android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml`
these files came from the initially generated application folder, using the Ionic Angular `blank` template.
initially, my project `assets` folder contained the following files:
* `icon-background.png`
* `icon-foreground.png`
* `icon-only.png`
* `splash.png`
* `splash-dark.png`
I then went back to Figma, re-exported the exact same assets as SVG instead of PNG, replaced the files in my project `assets` folder, and regenerated all Android and iOS assets.
this time, other than generating _mostly_ smaller `png` files (some splashes were actually bigger), I found no difference.. the aforementioned output files were still not regenerated.
---
I can fully understand the `xml` files not being updated in cases where the input assets are `png`, but I would have still expected the `drawable/splash.png` to be regenerated here.. unless this is an old file? in which case, it should be removed from the Ionic templates.
so the crux of my problem then: how can the "Android drawable" `xml` file be generated from these input assets? could this be created programmatically from the SVG source assets?
---
> **on a related note**... I did have _some_ difficulty generating the `AppIcon` iOS images for `20x20`, `29x29` and `40x40`, including all `@1x`, `@2x`, `@2x-1` and `@3x` variations, **until** I added the following two additional asset files:
>
> * `logo.png`
> * `logo-dark.png`
>
> I found the exact same behaviour when I duplicated the `icon-only.svg` file as `logo.svg` and `logo-dark.svg`.
Contributor guide
Assessment
This issue has not been assessed yet.