Skip to content

v0.8.0-beta.1#87

Merged
nathan-ahn merged 2 commits intomainfrom
v0.8.0-beta.1
Mar 15, 2026
Merged

v0.8.0-beta.1#87
nathan-ahn merged 2 commits intomainfrom
v0.8.0-beta.1

Conversation

@nathan-ahn
Copy link
Copy Markdown
Collaborator

@nathan-ahn nathan-ahn commented Mar 7, 2026

This pull request houses the changes queued for v0.8.0!

nathan-ahn and others added 2 commits March 7, 2026 13:38
* Fix package exclusion with sibling targets and xcconfig flag stripping

Previously, the App Clip target was generated nested inside the main app
target in the Podfile. This caused it to inherit all pods from the parent,
rendering `excludedPackages` completely ineffective.

This change moves the App Clip target to the top level as a sibling of the
main target, preventing implicit dependency inheritance.

However, even with the target un-nested, CocoaPods still emits linker flags
for all resolved pods into the generated `.xcconfig` files. This is
especially problematic under new architecture + static frameworks, where
Codegen headers are expected to exist for any linked package — causing
"file not found" build failures.

To address this, a `post_install` hook is injected that:
1. Removes excluded packages from the App Clip target's dependency graph
2. Strips all corresponding linker flags (`-l"Pkg"`, `-framework "Pkg"`)
   directly from the generated xcconfig files via `Xcodeproj::Config`

This two-pronged approach ensures excluded packages are absent from both
the build graph and the linker invocation, regardless of project settings.

Fixes #81, #79

* Add documentation about `excludedPackages` option

* Remove post_install xcconfig stripping (unnecessary after target un-nesting)

Once the App Clip target is a sibling rather than nested inside the main target, `use_expo_modules!(exclude:)` fully prevents excluded packages from being installed or linked. The `post_install` hook that manually stripped OTHER_LDFLAGS was compensating for inherited linker flags that no longer exist.

* Append target to end of Podfile without anchor

Rather than relying on an anchor that may change with later versions of Expo, we now just append the App Clip target to the end of the Podfile. This also removes dependency on Expo 53+.
@nathan-ahn nathan-ahn merged commit fbb214f into main Mar 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants