react-native-navigation icon indicating copy to clipboard operation
react-native-navigation copied to clipboard

iOS Build failing: ReactCommon/RCTHost.h file not found with react-native-navigation 8.2.1 on React Native 0.77.2

Open adeelSkills opened this issue 4 months ago • 1 comments

What happened?

Hi,

I’m trying to build my React Native project (RN 0.77.2) with react-native-navigation 8.2.1 on iOS, but the build keeps failing in Xcode with the following error:

'ReactCommon/RCTHost.h' file not found

What I did

Using react-native-navigation 8.2.1

iOS build through Xcode (also fails via npx react-native run-ios)

Followed existing fixes for import paths

Manually edited the library to point to the correct RCTHost paths (based on React Native 0.66.1 structure)

Ran pod deintegrate && pod install --repo-update

Cleaned DerivedData and reinstalled node_modules

Tried patch-package to persist the fix

But after doing all of this, the build still fails with the same RCTHost.h not found error.

my podfile =

require Pod::Executable.execute_command('node', ['-p', 'require.resolve( "react-native/scripts/react_native_pods.rb", {paths: [process.argv[1]]}, )', dir]).strip

platform :ios, '16.4'

pod 'Firebase/CoreOnly', '11.13.0' pod 'Firebase/DynamicLinks', '11.13.0' pod 'Firebase', :modular_headers => true pod 'FirebaseCore', :modular_headers => true pod 'FirebaseCoreInternal', :modular_headers => true pod 'GoogleUtilities', :modular_headers => true $RNFirebaseAsStaticFramework = true

prepare_react_native_project!

linkage = ENV['USE_FRAMEWORKS'] if linkage != nil Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green use_frameworks! :linkage => linkage.to_sym else use_frameworks! :linkage => :static end

target 'eurecab' do config = use_native_modules!

use_react_native!( :path => config[:reactNativePath], :app_path => "#{Pod::Config.instance.installation_root}/..", :hermes_enabled => true, :fabric_enabled => false, :new_arch_enabled => false )

post_install do |installer| react_native_post_install( installer, config[:reactNativePath], :mac_catalyst_enabled => false ) installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.4' config.build_settings['SWIFT_VERSION'] = '5.0' config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++20'

    extra_headers = [
      "${PODS_ROOT}/Headers/Private/React-RuntimeCore",
      "${PODS_ROOT}/Headers/Private/React-debug",
      "${PODS_ROOT}/Headers/Private/React-jserrorhandler",
      "${PODS_ROOT}/Headers/Private/React-jsinspector",
      "${PODS_ROOT}/Headers/Private/React-runtimescheduler",
      "${PODS_ROOT}/Headers/Private/React-performancetimeline",
      "${PODS_ROOT}/Headers/Private/React-rendererconsistency"
    ]
    config.build_settings['HEADER_SEARCH_PATHS'] ||= '$(inherited)'
    config.build_settings['HEADER_SEARCH_PATHS'] << " " + extra_headers.join(" ")

    config.build_settings['FRAMEWORK_SEARCH_PATHS'] ||= '$(inherited)'
    config.build_settings['FRAMEWORK_SEARCH_PATHS'] << " ${PODS_CONFIGURATION_BUILD_DIR}/React-RuntimeApple"

    config.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'
  end
end

end end

What was the expected behaviour?

No response

Was it tested on latest react-native-navigation?

  • [x] I have tested this issue on the latest react-native-navigation release and it still reproduces.

Help us reproduce this issue!

No response

In what environment did this happen?

React Native Navigation version: React Native version: Has Fabric (React Native's new rendering system) enabled: (yes/no) Node version: Device model: iOS version:

adeelSkills avatar Aug 18 '25 12:08 adeelSkills

@adeelSkills Seems related to 8026

fernandopontue avatar Aug 18 '25 17:08 fernandopontue

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest version and report back. Thank you for your contributions.

stale[bot] avatar Dec 17 '25 22:12 stale[bot]