Add support for iOS 18 layered icons and Xcode 14+ single-size format#126
Open
radu-ciobanu-fresha wants to merge 1 commit intoHazAT:masterfrom
Open
Add support for iOS 18 layered icons and Xcode 14+ single-size format#126radu-ciobanu-fresha wants to merge 1 commit intoHazAT:masterfrom
radu-ciobanu-fresha wants to merge 1 commit intoHazAT:masterfrom
Conversation
- Create IconCatalog class to parse Contents.json intelligently - Detect icon format types: legacy multi-size, single-size, or layered - For layered icons (all.png, dark.png, tint.png), badge all variants - Maintain backward compatibility with custom glob option - Bump version to 0.13.1 to satisfy fastlane-plugin-badge constraint (~> 0.13.0) Fixes issues with iOS 17/18 layered app icons that were breaking the badge overlay functionality.
|
Hello @HazAT, would be great if we can get this merged 🙌 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for iOS 18 layered icons and Xcode 14+ single-size format
Problem
The badge gem currently uses a simple glob pattern (
/**/*.appiconset/*.{png,PNG}) to find app icons, which doesn't understand modern iOS icon formats:all.png), dark mode (dark.png), and tinted variant (tint.png)This causes issues where either icons aren't badged correctly or the tool doesn't recognize the new format.
Solution
Added intelligent icon detection by parsing
Contents.jsonfrom asset catalogs:New
IconCatalogclassContents.jsonto understand icon structureBackward Compatibility
✅ Fully backward compatible:
--globoption still works (bypasses new logic)Changes
lib/badge/icon_catalog.rb- Contents.json parserlib/badge/runner.rb- Uses IconCatalog when no custom globlib/badge.rb- Requires icon_catalog module0.13.1Testing
Tested with:
Backward Compatibility
--globoption preserved (uses original code path, unchanged)Related Issues
Fixes iOS 18 layered icon support (mentioned in #122)