ebelair / icon-banner

🚩 IconBanner adds custom nice-looking banners over your mobile app icons πŸ“±
MIT License
34 stars 8 forks source link
banners fastlane fastlane-plugin icons

IconBanner

GitHub: @ebelair License Gem Fastlane

IconBanner adds custom nice-looking banners over your mobile app icons.

It is available both as a command-line tool and as a Fastlane plugin.

Introduction

IconBanner is inspired by the great HazAT/badge. It provides custom banner creation on-the-fly, allowing to create different text banners for different build contexts.

It allows to create this kind of icons:

🍏 iOS

Original Daily QA Staging Production
FaceTime Regular FaceTime Daily FaceTime QA FaceTime Staging FaceTime Production
iBooks Regular iBooks Daily iBooks QA iBooks Staging iBooks Production
Podcasts Regular Podcasts Daily Podcasts QA Podcasts Staging Podcasts Production
TestFlight Regular TestFlight Daily TestFlight QA TestFlight Staging TestFlight Production

πŸ€– Android

Original Daily QA Staging Production
Calender Regular Calender Daily Calender QA Calender Staging Calender Production
Games Regular Games Daily Games QA Games Staging Games Production
Mail Regular Mail Daily Mail QA Mail Staging Mail Production
Movies Regular Movies Daily Movies QA Movies Staging Movies Production

Setup

πŸš€ Fastlane

Start by running this command in your project repository:

fastlane add_plugin icon_banner

Then simply add the following actions in your Fastfile:

lane :sample do
  icon_banner([options])
  # [build_ios_app and other actions]
  icon_banner_restore()
end

For more details, see the Usage section below.

πŸ’» Standalone

First install the gem:

gem install icon-banner

Then use it directly from the root of your app repository:

icon-banner generate [options]
icon-banner restore

For more details, see the Usage section below.

Usage

Generate

Generates banners and adds them to app icons. Available via:

Key Description Default
label Sets the text to display inside the banner BETA
color Sets the text color (when not set, the script uses the dominant icon color)
font Sets the text font with a direct link to a TTF file (when not set, the script uses the embedded LilitaOne font)
backup Creates a backup of icons before applying banners (only set to false if you are under source-control) true

Sample usages:

# fastlane
icon_banner(label: 'QA')
icon_banner(label: 'QA', color: '#ff000088', font: '/Users/johndoe/Documents/mybestfont.ttf')
# command-line
icon-banner generate --label QA
icon-banner generate --label QA --color '#ff000088' --font '/Users/johndoe/Documents/mybestfont.ttf'

Restore

Restores app icons without banners (if backups are available). Available via:

No options are required – if backup files are available, they are automatically restored.

Sample usage:

# fastlane
icon_banner_restore()
# command-line
icon-banner restore

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ebelair/icon-banner.

License

IconBanner is Β©2019 ebelair and may be freely distributed under the MIT license. See the LICENSE file.

The project is highly inspired by badge by HazAT. Used also under the MIT license. Thanks again. πŸ™

About ebelair

Γ‰mile BΓ©lair acts as a Product Owner @ Mirego. He enjoys creating great products and works hard with his team to deliver some of the greatest.