flutter_launcher_icons icon indicating copy to clipboard operation
flutter_launcher_icons copied to clipboard

[BUG] ios icon not generated with multi flavor

Open lucagiordano-visia opened this issue 2 years ago • 7 comments

I'm trying to generate app icons with 2 flavor. On android all good. On ios it doesn't, it still shows the old icon app that was set before i did the 2 flavor.

I don't know if is that "No platform provided" message the problem

flutter pub run flutter_launcher_icons:main -f flutter_launcher_icons-criocabin.yaml Building package executable... (1.8s) Built flutter_launcher_icons:main. This command is deprecated and replaced with "flutter pub run flutter_launcher_icons" ════════════════════════════════════════════ FLUTTER LAUNCHER ICONS (v0.13.1)
════════════════════════════════════════════

Flavor: criocabin • Creating default icons Android • Overwriting the default Android launcher icon with a new icon • Creating adaptive icons Android • Updating colors.xml with color for adaptive icon background • Building iOS launcher icon for criocabin No platform provided

Flavor: evco • Creating default icons Android • Overwriting the default Android launcher icon with a new icon • Creating adaptive icons Android • Updating colors.xml with color for adaptive icon background • Building iOS launcher icon for evco No platform provided

✓ Successfully generated launcher icons for flavors

lucagiordano-visia avatar Jun 14 '23 15:06 lucagiordano-visia

Hey running into the same issue. the command seems to ignore the -f attribute and executes only the flavor files but does not execute the "default" flavor.

ynnob avatar Jul 06 '23 07:07 ynnob

I just ran into this as well. What you'll want to do, is go into the ios/ folder and delete the default icon (probably ios/Runner/Assets.xcassets/AppIcon.appiconset/).

Then open up the iOS subproject in Xcode and open Runner.xcodeproj > Build Settings > Search for "Primary App Icon Set Name". In there, update all the values for each flavor to AppIcon-flavorname (looks like AppIcon-criocabin and AppIcon-evco for the flavors above). Then open up the Runner target in that same file and repeat those same steps in there.

I'm not really an iOS developer, so I'm not 100% confident that's everything that needs to be done, but it seems to be working for me 🤷

petitJAM avatar Jul 18 '23 21:07 petitJAM

I just ran into this as well. What you'll want to do, is go into the ios/ folder and delete the default icon (probably ios/Runner/Assets.xcassets/AppIcon.appiconset/).

Then open up the iOS subproject in Xcode and open Runner.xcodeproj > Build Settings > Search for "Primary App Icon Set Name". In there, update all the values for each flavor to AppIcon-flavorname (looks like AppIcon-criocabin and AppIcon-evco for the flavors above). Then open up the Runner target in that same file and repeat those same steps in there.

I'm not really an iOS developer, so I'm not 100% confident that's everything that needs to be done, but it seems to be working for me 🤷

This is legit answer, resolve my problem. thanks!

nenzan avatar Jul 28 '23 06:07 nenzan

For me it helped to add all platforms, also web, windows and macos (even if I am just using Android and iOS at least for now):

  web:
    generate: true
    image_path: "path/to/image.png"
    background_color: "#hexcode"
    theme_color: "#hexcode"
  windows:
    generate: true
    image_path: "path/to/image.png"
    icon_size: 48 # min:48, max:256, default: 48
  macos:
    generate: true
    image_path: "path/to/image.png"

I also applied @nenzan 's instructions first. I am not sure if they affected too that it started to work for me.

jukka-palomaki avatar Aug 02 '23 14:08 jukka-palomaki

Target’s Build Settings and search for primary app icon. Here we set the correct app icon for each schema. Runner-> Build Settings -> Primary App Icon Set Name

YudizAndroidNareshP avatar Sep 21 '23 05:09 YudizAndroidNareshP

it keeps happening i tried everything is there any solution available

syed-growexxer avatar Jun 05 '25 12:06 syed-growexxer