Fix iOS localized icons: inject CFBundleIconName so actool emits CFBundleAlternateIcons#4870
Merged
shai-almog merged 1 commit intomasterfrom May 5, 2026
Merged
Conversation
…ndleAlternateIcons
The asset-catalog-based approach for localized iOS launcher icons relies on
actool generating a partial Info.plist that contains CFBundleIcons /
CFBundleAlternateIcons, which is then merged into the app's Info.plist.
actool only emits that partial plist when CFBundleIconName is present in
the source Info.plist; without it the alternate icons get compiled into
the .car file but the bundle never advertises them, so
-[UIApplication setAlternateIconName:completionHandler:] fails at runtime
("alternate icon name not found in bundle").
Inject `<key>CFBundleIconName</key><string>AppIcon</string>` whenever
localized icons are present so actool produces the correct merged plist
and the runtime selector wired up in CodenameOne_GLAppDelegate.m can
resolve the locale-specific icon.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
Collaborator
Author
|
Compared 89 screenshots: 89 matched. Native Android coverage
✅ Native Android screenshot tests passed. Native Android coverage
Benchmark ResultsDetailed Performance Metrics
|
Collaborator
Author
|
Compared 87 screenshots: 87 matched. Benchmark Results
Build and Run Timing
Detailed Performance Metrics
|
5 tasks
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.
Summary
actoolgenerating a partialInfo.plistcontainingCFBundleIcons/CFBundleAlternateIconsfrom the asset catalog. Xcode then merges that partial into the app's finalInfo.plistso-[UIApplication setAlternateIconName:completionHandler:]can resolve alternate icons at runtime.actoolonly emits that partial plist whenCFBundleIconNameis present in the sourceInfo.plist. Our template (vm/ByteCodeTranslator/src/template/template/template-Info.plist) only has the legacyCFBundleIconFilesarray, so the alternate icons get compiled into the.carbut the bundle never advertises them. CallingsetAlternateIconName:then fails with "alternate icon name not found in bundle" — which is the symptom a customer just hit on a build.<key>CFBundleIconName</key><string>AppIcon</string>intoInfo.plistwheneverlocalizedIconsis non-empty (the only path that needs it), soactoolproduces the merged plist with bothCFBundlePrimaryIconandCFBundleAlternateIcons, and the runtime selector wired up inCodenameOne_GLAppDelegate.mcan switch to the locale-specific icon.Verification on a customer build
Customer's generated sources had everything but the plist key:
Images.xcassets/AppIcon_ar_AE.appiconsetandAppIcon_en_AE.appiconsetcorrectly created with PNGs andContents.json✅project.pbxprojhadASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES = "AppIcon_ar_AE AppIcon_en_AE"✅CodenameOne_GLAppDelegate.mhad thesetAlternateIconName:selector ✅hPLUS-Info.plistwas missingCFBundleIconName❌ ← root causeA matching change is going out to the BuildDaemon (the production build server uses that codebase, not this maven plugin source directly).
Test plan
mvn test -Plocal-dev-javaseinmaven/codenameone-maven-plugin/passes (43/43 ✅ locally)cn1_icon_<lang>[_<COUNTRY>].pngfiles innative/ios/(or in the resources), trigger an iOS build and confirm:*-Info.plistin the generated Xcode source now contains<key>CFBundleIconName</key><string>AppIcon</string>.app's finalInfo.plist(post-actoolmerge) containsCFBundleIcons→CFBundleAlternateIconswith one entry per localecn1_icon_*.pngfiles and confirm the new key is not injected (regression guard)🤖 Generated with Claude Code