You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(ios): import React Native headers with the React/ prefix (fixes the build on React Native 0.87) - #988
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-agora/ios/AgoraRtcSurfaceViewManager.mm:2:9: fatal error: 'RCTBridge.h' file not found
This changes those imports to the namespaced form, which every React Native version resolves:
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.
Hit this on Expo SDK 58 / React Native 0.88 too (React Native ships as a prebuilt React.framework there), with react-native-agora 4.6.4 and 4.6.4-build.1: 'RCTBridge.h' file not found in ios/AgoraRtcSurfaceViewManager.mm.
We also changed #import "RCTFabricComponentsPlugins.h" to #import <React/RCTFabricComponentsPlugins.h> in ios/AgoraRtcSurfaceView.mm to be safe, since it is the same unprefixed pattern. Would be great to get this merged and released.
Thanks for confirming on Expo SDK 58 / RN 0.88! I added the RCTFabricComponentsPlugins.h change too (cd6020a). React Native 0.88 still re-exposes that header for quoted imports (scripts/cocoapods/rncore_facades.rb), so it isn't strictly needed today, but the <React/...> form works with both source builds and the prebuilt framework without relying on that. It is also the form react-native-screens, react-native-gesture-handler and react-native-pager-view use.
This branch has not been deployed
No deployments
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
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.
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:This changes those imports to the namespaced form, which every React Native version resolves:
ios/AgoraRtcSurfaceViewManager.mmThe 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 foundbefore 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