fluttercommunity / flutter_launcher_icons

Flutter Launcher Icons - A package which simplifies the task of updating your Flutter app's launcher icon. Fully flexible, allowing you to choose what platform you wish to update the launcher icon for and if you want, the option to keep your old launcher icon in case you want to revert back sometime in the future. Maintainer: @MarkOSullivan94
https://pub.dev/packages/flutter_launcher_icons
MIT License
2.01k stars 406 forks source link

[BUG] App icon generation with flavors seems to corrupt project.pbxproj #565

Open LennardDeurman opened 4 months ago

LennardDeurman commented 4 months ago

:information_source: Info

Version: 0.13.1

:speech_balloon: Description

Using the flutter_launcher_icons package I'm trying to create App icons for two flavors. I've created a flutter_launcher_icons-production.yaml and a flutter_launcher_icons-staging.yaml. My two flavors are named production and staging.

After running the command: flutter pub run flutter_launcher_icons I receive an error when opening the Xcode project, and get the following error when running the app again:

Screenshot 2024-07-08 at 10 34 54 Screenshot 2024-07-08 at 10 35 55

When I reset the project.pbxproj to the version before the modifications after the icon generations it works, and I can manually select the icons. It would however be great if this can be automatically done.

:scroll: Pubspec.yaml

flutter_launcher_icons-production.yaml

flutter_launcher_icons:
  android: true
  adaptive_icon_background: "assets/launcher/production/android/background.png"
  adaptive_icon_foreground: "assets/launcher/production/android/foreground.png"
  ios: true
  remove_alpha_ios: true
  image_path: "assets/launcher/production/icon.png"

flutter_launcher_icons-staging.yaml

flutter_launcher_icons:
  android: true
  adaptive_icon_background: "assets/launcher/staging/android/background.png"
  adaptive_icon_foreground: "assets/launcher/staging/android/foreground.png"
  ios: true
  remove_alpha_ios: true
  image_path: "assets/launcher/staging/icon.png"
mayudevID commented 1 month ago

same