ionic-team / ionic-team/capacitor-assets

Can we programatically run @capacitor/assets to generate and copy all the app/splash icons to ios/android folders

Open
#592 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
583
Forks
116
PR merge metrics
No merged PRs in 30d

Description

I was using `cordova-res` plugin for programatically generating and updating to respective ios/android folders.

`const cordovaResOptions = {
copy: true,
skipConfig: true,
}`

**Android** -

cordovaRes.run({
...cordovaResOptions,
platforms: {
android: {
icon: { sources: iconSources },
'adaptive-icon': {
foreground: { sources: iconForegroundSources },
background: { sources: iconBackgroundSources },
},
splash: { sources: splashSources }
}
},
})`

**IOS**

`cordovaRes.run({
...cordovaResOptions,
platforms: {
ios: {
icon: { sources: iconSources },
}
},
})
cordovaRes.run({
...cordovaResOptions,
// don't use cordova-res to copy splash screen assets to iOS project
copy: false,
platforms: {
ios: {
splash: { sources: splashSources }
}
},
})`

I tried using the `run` from the `@capacitor/assets` and it is not working as expected, neither generating image nor updating it to the respective folders.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.