icon: flatten iOS app icons opaque (App Store 90717), keep Android transparent#37
Merged
Conversation
…ansparent Apple rejects any alpha channel on the App Store marketing icon (error 90717). write_ios_icons now flattens an alpha-bearing source onto an opaque background (explicit :background_color or the sampled adaptive-icon colour) before resizing; an opaque source is untouched. Android keeps transparency — adaptive foregrounds and legacy launcher icons need it, and a flat background looks bad on some launchers. mix mob.icon threads --adaptive-bg to both platforms. The bundled fallback mob_logo iOS assets (can't be flattened at runtime without the image dep) were pre-flattened opaque; Android-size assets keep their alpha. Verified on Sloppy Joe: the rebuilt IPA passed App Store validation to TestFlight. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Merged
GenericJam
added a commit
that referenced
this pull request
Jul 8, 2026
iOS app icons are now flattened onto an opaque background so App Store upload validation no longer rejects a transparent source (altool error 90717). Android keeps its adaptive/legacy transparency. (#37) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
App Store upload validation rejects an app whose 1024 marketing icon has an alpha channel:
IconGenerator.write_ios_iconsjustImage.thumbnail!'d the source into each iOS size, so a transparent source (a common design — a rounded badge on transparent corners) produced transparent iOS icons and tripped 90717. The bundled fallbackmob_logoiOS assets had the same issue.Android must not be flattened — adaptive foregrounds + legacy launcher icons rely on transparency, and a flat background renders badly on some launchers. So the fix is platform-specific.
Fix
write_ios_iconsruns the source through a newflatten_for_ios/2: an alpha-bearing source is composited onto an opaque background viaImage.flatten!/2; an opaque source is left untouched.:background_coloroption, else sampled with the sameextract_background_color/1the adaptive Android background uses → the opaque iOS icon and the Android adaptive background share one colour.mix mob.iconthreads--adaptive-bgto both platforms.mob_logoiOS-size PNGs pre-flattened opaque (they can't be flattened at runtime without theimagedep). iOS/Android sizes are disjoint files, so Android assets keep their alpha.Tests
icon_generator_test.exs::background_colorfills the flattened iOS icon (asserts the centre pixel)Verified
Sloppy Joe (rounded-badge transparent icon): the rebuilt IPA passed App Store validation and reached TestFlight (this exact 90717 was how it was found).
ADR:
decisions/2026-07-08-ios-icons-flattened-opaque.md.🤖 Generated with Claude Code