fix(plugin): prevent app icon inheritance in widget extension build settings#55
Open
alex-vance wants to merge 1 commit intocallstackincubator:mainfrom
Open
Conversation
|
@alex-vance is attempting to deploy a commit to the Callstack Team on Vercel. A member of the Team first needs to authorize it. |
…ettings Widget extensions (Live Activities, Home Screen Widgets) don't display app icons. When the parent Expo project sets ASSETCATALOG_COMPILER_APPICON_NAME at the project level (especially when using the .icon format from Xcode 16+), this setting gets inherited by the widget extension target. Since the extension's asset catalog doesn't contain the icon, the build fails with: "None of the input catalogs contained a matching app icon set named 'X'" This fix explicitly sets ASSETCATALOG_COMPILER_APPICON_NAME = "" on the widget extension target, which overrides the inherited value and tells Xcode not to compile any app icon for this target. This is safe because: - Widget extensions never display app icons in any iOS context - Setting to empty string is the canonical way to opt-out of icon compilation - This follows the same pattern Voltra already uses for other build settings (e.g., APPLICATION_EXTENSION_API_ONLY, CODE_SIGN_ENTITLEMENTS) Fixes callstackincubator#39
aa567f8 to
f38b276
Compare
Author
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
This PR fixes a build failure that occurs when using Voltra with Expo projects that use the
.iconformat (Xcode 16+ Icon Composer) for app icons.Fixes #39
Problem
When an Expo project sets its app icon using the modern
.iconformat, Expo configuresASSETCATALOG_COMPILER_APPICON_NAMEat the project level. This build setting gets inherited by the widget extension target that Voltra creates. Since the extension's asset catalog doesn't contain this icon, the build fails with:Solution
Explicitly set
ASSETCATALOG_COMPILER_APPICON_NAME = ""in the widget extension's build settings. This overrides the inherited project-level value and tells Xcode not to compile any app icon for this target.Why This Is Safe
APPLICATION_EXTENSION_API_ONLYandCODE_SIGN_ENTITLEMENTS..appiconsetformat will not be affected; the empty string simply ensures no icon compilation happens (which is correct for extensions).Testing
.iconformatnpm test- 186 tests)npm run lint:libOnly)Workaround Reference
For users who need an immediate fix before this PR is merged, I've documented a workaround using a custom Expo config plugin in issue #39.