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

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

Open
jkrrish-ac opened this issue Feb 21, 2024 · 0 comments

Comments

@jkrrish-ac
Copy link

jkrrish-ac commented Feb 21, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant