Skip to content

fix(ios): import React Native headers with the React/ prefix (fixes the build on React Native 0.87) - #99

Open
AlicanAkyol wants to merge 1 commit into
paufau:mainfrom
AlicanAkyol:fix/react-native-0-87-header-imports
Open

AlicanAkyol wants to merge 1 commit into
paufau:mainfrom
AlicanAkyol:fix/react-native-0-87-header-imports

Conversation

@AlicanAkyol

Copy link
Copy Markdown

React Native 0.87 ships its iOS headers as header-only XCFrameworks (prebuilt by default), so a React Native header imported without its React/ namespace is no longer found and the iOS build stops, for example:

react-native-multiple-modals/ios/Library/Animations/SlideOut/SlideOutAnimation.m:1:9: error: 'RCTUtils.h' file not found (in target 'react-native-multiple-modals' from project 'Pods')

This changes those imports to the namespaced form, which every React Native version resolves:

  • ios/Library/Animations/SlideIn/SlideInAnimation.m
  • ios/Library/Animations/SlideOut/SlideOutAnimation.m
  • ios/RNTModalShadowView.h
  • ios/RNTModalShadowView.m
  • ios/RNTModalViewManager.m

The release notes describe the change: https://reactnative.dev/blog/2026/08/11/react-native-0.87#headers-breaking-changes

Tested in a new React Native 0.87.1 app (default prebuilt core, Xcode 26.2), building this library's pod target: it fails with 'RCT….h' file not found before the change and builds after it. <React/…> has been the documented form for a long time, so older React Native versions are not affected.

Found while checking popular React Native libraries against 0.87 with NativeKeel, an open-source scanner I maintain; the other libraries that hit this are listed at https://nativekeel.com/fix/rctcomponent-h-file-not-found-react-native-0-87

@paufau

paufau commented Oct 26, 2026

Copy link
Copy Markdown
Owner

Hey, thanks for the PR, seems like it works fine, but I have to check which minimum RN version is supported. Looks like this change might bump it up

This branch has not been deployed

No deployments
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