Skip to content

fix(🍏): include cpp/api, cpp/skia, cpp/jsi, cpp/rnskia, cpp/utils in HEADER_SEARCH_PATHS#3849

Closed
mini-777 wants to merge 1 commit into
Shopify:mainfrom
mini-777:fix/static-frameworks-header-search-paths
Closed

fix(🍏): include cpp/api, cpp/skia, cpp/jsi, cpp/rnskia, cpp/utils in HEADER_SEARCH_PATHS#3849
mini-777 wants to merge 1 commit into
Shopify:mainfrom
mini-777:fix/static-frameworks-header-search-paths

Conversation

@mini-777
Copy link
Copy Markdown
Contributor

Summary

Under use_frameworks! :linkage => :static (or Expo's useFrameworks: 'static'), the recursive "$(PODS_TARGET_SRCROOT)/cpp/"/** glob in the podspec does not propagate to sibling directories under cpp/, so compilation fails with errors like:

node_modules/@shopify/react-native-skia/cpp/api/third_party/base64.cpp:7:10
> 7 | #include "third_party/base64.h"
     |          ^ 'third_party/base64.h' file not found

The header exists at cpp/api/third_party/base64.h, but cpp/api is not on the explicit HEADER_SEARCH_PATHS list — and likewise for sibling sources that reference headers under cpp/skia, cpp/jsi, cpp/rnskia, and cpp/utils.

Fix

Add the five missing directories explicitly alongside the existing rnwgpu / dawn entries:

-"HEADER_SEARCH_PATHS" => '"$(PODS_TARGET_SRCROOT)/cpp/"/** "$(PODS_TARGET_SRCROOT)/cpp" "$(PODS_TARGET_SRCROOT)/cpp/jsi2" ...'
+"HEADER_SEARCH_PATHS" => '"$(PODS_TARGET_SRCROOT)/cpp/"/** "$(PODS_TARGET_SRCROOT)/cpp" "$(PODS_TARGET_SRCROOT)/cpp/api" "$(PODS_TARGET_SRCROOT)/cpp/skia" "$(PODS_TARGET_SRCROOT)/cpp/jsi" "$(PODS_TARGET_SRCROOT)/cpp/jsi2" "$(PODS_TARGET_SRCROOT)/cpp/rnskia" "$(PODS_TARGET_SRCROOT)/cpp/utils" ...'

The relative ordering of the rnwgpu/dawn entries is preserved; only the five sibling roots are inserted.

Verification

Affected versions

The same incomplete line exists on main and back through at least 2.4.18, so this PR targets main and benefits every consumer using static frameworks.

Related

…HEADER_SEARCH_PATHS

Under `use_frameworks! :linkage => :static` (or Expo's
`useFrameworks: 'static'`), the recursive `"$(PODS_TARGET_SRCROOT)/cpp/"/**`
glob does not propagate to sibling directories, so compilation of
`cpp/api/third_party/base64.cpp` fails with `'third_party/base64.h' file not
found` (and similar misses for headers under `cpp/skia`, `cpp/jsi`,
`cpp/rnskia`, `cpp/utils`).

Add those five paths explicitly alongside the existing rnwgpu/dawn entries
so static-frameworks builds resolve them.

Fixes Shopify#3839.
@mini-777 mini-777 closed this May 22, 2026
@mini-777 mini-777 reopened this May 22, 2026
@mini-777 mini-777 force-pushed the fix/static-frameworks-header-search-paths branch from 9a8ebcb to 4f448c6 Compare May 22, 2026 05:29
@wcandillon
Copy link
Copy Markdown
Contributor

Thank you for the PR. This is great. Currently updating the Expo e2e test to outline the issue, then fixing the bogus path imports. Will keep you posted asap.

@wcandillon wcandillon self-requested a review May 23, 2026 07:08
@wcandillon
Copy link
Copy Markdown
Contributor

#3853 is super-seeding this PR, I'm publishing now let me know if it fixes the issue. Thank You for this 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants