tuist / tuist

A Swifty toolchain to build better Apple apps, faster
https://tuist.io
MIT License
4.36k stars 517 forks source link

Add target app icon badge feature #6131

Open kapitoshka438 opened 3 months ago

kapitoshka438 commented 3 months ago

What problem or need do you have?

It would be great to add an option to generate AppIcon sets with a badge for each application Target by passing path to the badge image. Just like fastlane-badge-plugin does it.

Potential solution

No response

macOS version

14.4.1

Tuist version

4.8.1

Xcode version

15.3

pepicrft commented 3 months ago

@kapitoshka438 how would you expect the API to be?

kapitoshka438 commented 3 months ago

I'd like to have something similar to this tool or its Fastlane plugin: https://github.com/HazAT/badge

Target init would accept a new parameter (TargetIconBadgeConfig):

This would draw stuff on the source images using CoreGraphics and generate a new icon set for the Target, link it to the target resources and put it somewhere in derived folder to let it be passed to gitignore. I know this can be challenging and may not be perceived as something important and related to Tuist core functionality. But this would help to have more features working out the box. We have 4 application targets: dev, test, pre (pre-release) and production (no-badge) with unique app icons.