IDEMSInternational / open-app-builder

PLH App Frontend
GNU General Public License v3.0
6 stars 25 forks source link

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

Open jfmcquade opened 1 year ago

jfmcquade commented 1 year ago

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 commented 6 months ago
  • 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