Skip to content

fix(ios): resolve ImportReact.h in Expo modular builds - #639

Merged
sunnylqm merged 1 commit into
reactnativecn:masterfrom
rokiai:fix/ios-expo-umbrella-import-react
Sep 13, 2026
Merged

fix(ios): resolve ImportReact.h in Expo modular builds#639
sunnylqm merged 1 commit into
reactnativecn:masterfrom
rokiai:fix/ios-expo-umbrella-import-react

Conversation

@rokiai

@rokiai rokiai commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Expo SDK 57 (and other DEFINES_MODULE + modular-header setups) generate react-native-update-umbrella.h under Headers/Public/react_native_update/ (underscores). That umbrella #import "ImportReact.h".
  • ImportReact.h was marked public_header_files but not source_files, so CocoaPods never copied it into Headers/Public. Combined with the hyphenated public-header dir (react-native-update/) missing from USER_HEADER_SEARCH_PATHS, iOS compile failed with 'ImportReact.h' file not found.
  • Add ios/ImportReact.h to source_files in the Expo branch, and put $(PODS_ROOT)/Headers/Public/react-native-update on the search path (PODS_ROOT, not a machine-specific source path).

Test plan

  • Expo SDK 57 / RN 0.86 project with use_expo_modules! and modular headers: pod install, then compile the iOS target. The umbrella should find ImportReact.h.
  • Confirm ios/Pods/Headers/Public/react-native-update/ImportReact.h exists after pod install.
  • Non-Expo / RN CLI project still pods and builds (Expo source_files branch is gated on use_expo_modules!).
  • Search paths stay $(PODS_ROOT)/... only — no absolute checkout path in the generated xcconfig.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Bug Fixes
    • Improved iOS integration for CocoaPods by enabling umbrella-header imports from the public-header location.
    • Ensured valid Expo projects include the required iOS import source file.

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: cf7aa018-4242-40d3-ba75-b1116b60764e

📥 Commits

Reviewing files that changed from the base of the PR and between 583801a and 7861f35.

📒 Files selected for processing (1)
  • react-native-update.podspec

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The podspec adds the public-header search path and includes ios/ImportReact.h in the Expo-specific source files.

Changes

CocoaPods header integration

Layer / File(s) Summary
Podspec header declarations
react-native-update.podspec
The podspec adds the hyphenated public-header search path and declares ios/ImportReact.h as an Expo-specific source file.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Suggested reviewers: sunnylqm

Merge Risk: ⚪ Minimal · up to 3ac5b

The narrowly scoped Expo podspec updates introduce no identified merge-blocking behavior or production risk.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the iOS Expo modular-build fix and matches the main changes to ImportReact.h resolution and CocoaPods configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

DEFINES_MODULE generates an umbrella that imports public headers, but
ImportReact.h was public-only and the hyphenated Headers/Public path
was not on the search list, so Expo SDK 57 compiles failed.
@rokiai
rokiai force-pushed the fix/ios-expo-umbrella-import-react branch from 7861f35 to 3ac5b48 Compare September 13, 2026 15:57
@sunnylqm
sunnylqm merged commit d61030d into reactnativecn:master Sep 13, 2026
11 checks passed
sunnylqm added a commit that referenced this pull request Sep 14, 2026
Bump package.json and harmony/pushy/oh-package.json5 together for the
Expo iOS public-header fix from #639. No additional runtime changes.
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