Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Migrate package used for generating Android assets cordova-res->@capacitor/assets #2072

Open
jfmcquade opened this issue Aug 31, 2023 · 1 comment
Labels
feature Work on app features/modules

Comments

@jfmcquade
Copy link
Collaborator

jfmcquade commented Aug 31, 2023

What?
The package that we use for dynamically generating Android assets (icon and splash screen) was previously known as "cordova-res", but has changed to "@capacitor/assets". We use the legacy cordova-res package, but should migrate to use @capacitor/assets.

Why?
It's possible that the assets generated by cordova-res are in a legacy format not supported since the targeting of api 33 and the migration to Capacitor 5 #2046. Possibly the cause of this Android build failure.

EDIT - It appears that capacitor-assets does not support being run programmatically, so cannot replace cordova-res like-for-like

@chrismclarke
Copy link
Member

chrismclarke commented Mar 18, 2024

  • It appears that capacitor-assets does not support being run programmatically

Anything that executes code can be run programmatically, just varies the steps required to do so (e.g. importing the SDK into a JS script or executing a shell script to call a binary with params).

Although it looks like the documentation has possibly been updated to include pretty clear instructions how to do so now at least:
https://github.com/ionic-team/capacitor-assets?tab=readme-ov-file#usage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Work on app features/modules
Projects
None yet
Development

No branches or pull requests

2 participants