Skip to content

feat: iOS/macOS app icons naming suffix -flavor#362

Open
defuncart wants to merge 2 commits intoAngeloAvv:masterfrom
defuncart:feature/ios-app-icons-naming-minus-suffix
Open

feat: iOS/macOS app icons naming suffix -flavor#362
defuncart wants to merge 2 commits intoAngeloAvv:masterfrom
defuncart:feature/ios-app-icons-naming-minus-suffix

Conversation

@defuncart
Copy link
Copy Markdown

Firstly thanks for creating this package, it is very useful, especially when integrating flavors into existing projects.

For iOS & macOS, the generated app icon naming is <FLAVOR>AppIcon, however generally AppIcon-<FLAVOR> is the convention. This is also the naming used by flutter_launcher_icons, so when a project depends on both of these packages (i.e. flutter_flavorizr to generate flavors, flutter_launcher_icons to update icons at a later stage), then manual rework is required so that AppIcon-dev etc. is used in project.pbxproj.

This PR adjusts the icon generation to be AppIcon-dev instead of devAppIcon.

This could also be a solution for #329 - generate app icons in a format supported also by flutter_launcher_icons, and then use flutter_launcher_icons to add dark/tint icons on iOS, monochrome on android etc.

This isn't technically a breaking change. AppIcon-dev is created and correctly referenced. devAppIcon does still exist but should not affect the app. A migration could be mentioned to delete the old assets.

@xShuusui
Copy link
Copy Markdown

xShuusui commented Oct 2, 2025

It is also possible to override the app icon name during generation:

@defuncart
Copy link
Copy Markdown
Author

It is also possible to override the app icon name during generation:

Thanks @xShuusui for the info :) I'll leave the PR opened incase @AngeloAvv wants to migrate to suffix naming.

@AngeloAvv
Copy link
Copy Markdown
Owner

Hey @defuncart , thanks for your help!

How does this behave when running the processor(s) multiple times on a previously flavorized project with the suffix approach? I need to understand if this should be considered a breaking change or not.

I mean, I'm not concerned about the previously generated assets (which we could get rid of by adding another processor), but I wanna make sure the xcode project/workspace and schema files are not corrupted.

@AngeloAvv
Copy link
Copy Markdown
Owner

@defuncart are you still able to follow up on this PR? There are a few things that need to be fixed.

@defuncart
Copy link
Copy Markdown
Author

@defuncart are you still able to follow up on this PR? There are a few things that need to be fixed.

Hi @AngeloAvv, I currently am unable to look further into this, perhaps in a couple of weeks. From what I remember there was no schema corruption. However a few PRs has landed since then, so branch needs a rebase and another round of testing.

static String iOSAssetsPath = '$iOSRunnerPath/Assets.xcassets';

static String iOSAppIconPath = '$iOSAssetsPath/%sAppIcon.appiconset/%s';
static String iOSAppIconPath = '$iOSAssetsPath/AppIcon-dev.appiconset/%s';
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this an oversight?

Suggested change
static String iOSAppIconPath = '$iOSAssetsPath/AppIcon-dev.appiconset/%s';
static String iOSAppIconPath = '$iOSAssetsPath/AppIcon-%s.appiconset/%s';

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

Successfully merging this pull request may close these issues.

3 participants