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
2k stars 400 forks source link

iOS Dark and Tinted icons are not placed in the correct directory #596

Open vlazdra opened 1 day ago

vlazdra commented 1 day ago

:information_source: Info

0.14.1

:speech_balloon: Description

When running the command it creates an additional folder for the Dark and for the Tinted icons which is not how it's supposed to be. The Dark and Tinted icons should be placed in the already existing or the main AppIcon catalog (taking into account the flavor part if present)

:scroll: Pubspec.yaml

flutter_launcher_icons:
  android: true
  ios: true
  image_path_android: 'app_icons/android-development.png'
  image_path_ios: 'app_icons/ios-development.png'
  image_path_ios_dark_transparent: 'app_icons/logo-development.png'
  image_path_ios_tinted_grayscale: 'app_icons/logo-development.png'
  desaturate_tinted_to_grayscale_ios: true
  remove_alpha_ios: true
  adaptive_icon_background: '#ffffff'
  adaptive_icon_foreground: 'app_icons/logo-development.png'
  adaptive_icon_foreground_inset: 0
  adaptive_icon_monochrome: 'app_icons/logo-development.png'
  web:
    generate: false
  windows:
    generate: false
  macos:
    generate: false
MarkOSullivan94 commented 1 day ago

The Dark and Tinted icons should be placed in the already existing or the main AppIcon catalog (taking into account the flavor part if present)

@vlazdra can you please provide me with a link to the documentation which states this?

I tested the v0.14.1 dark icon and tinted icon implementation tonight with no issues thankfully

vlazdra commented 23 hours ago

@vlazdra, could you please provide a link to the documentation that outlines this?

@MarkOSullivan94 I haven't had a chance to review the documentation thoroughly, but when I open the Xcode preview of the icon catalog, I notice that for the icon you've set up, there are additional versions on the right side. Assuming the UI in Xcode serves as the guide, I believe that if I'm creating different versions of the same icon, they should be placed within the same catalog that already contains all existing icon sizes and dimensions, including the newly added dark and tinted icons. Since these are variations of the same launcher icon, they should reside in the same launcher icon catalog.

Currently, my launcher icon is named AppIcon, and I have three different sets based on the flavor:

However, the current version of the library is creating an additional appiconset for the dark and tinted versions for each flavor, which seems unnecessary. Additionally, the Contents.json file references the correct icons but points to the wrong directory, causing the icons not to display properly in Xcode when using flavors.

When I run the command to generate all the flavors in my project, it unnecessarily creates additional catalogs that aren't properly linked with the main icon set. Here's a screenshot illustrating this issue: Issue Screenshot

On the other hand, with the changes I've introduced in this PR, the Dark and Tinted icons are generated inside my main app icon set folder, ensuring they are properly linked and displayed in Xcode: Fixed Screenshot

Note: The Contents.json file is generated accordingly, so I haven't modified that file.