Appdelegate h 1 9 fatal error react rctbridgedelegate h file not found

Same error for the demo AwesomeProject. react-native info: info Fetching system and libraries information... System: OS: macOS 10.14.6 CPU: (6) x64 Intel(R) Core(TM) i5-8500B CPU @ 3.00GHz Memory: ...

@slavikdenis , this:

Solution:
-Install Cocoa Pods
sudo gem install cocoapods
-In your Project Folder:
cd ios
pod install

is not a solution. I already have Cocoapods installed and ran pod install. In fact, the error I have above is what I got after I added new Targets to my XCode and ran a pod deintegrate cleaned the XCode and rebuilt it and then refactored the Podfile and then successfully ran pod install.

Afterwards, when I ran react-native run-ios, thats when I started getting the following error:

AppDelegate.h:8:9: fatal error: 'React/RCTBridgeDelegate.h' file not found
#import <React/RCTBridgeDelegate.h>

The file does indeed exist in my Pods/Headers/Public directory inside of the React/ folder that is inside of React-Core/. Any help would be appreciated. Here is the MVP that looks similar to what I have:

https://github.com/ldco2016/NFIBEngage

And this is the Podfile configuration it needs:

platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

target 'DEV' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for DEV
  # pod 'AppCenter/Push', '~> 1.3.0'
  pod 'AppCenter/Crashes', '~> 2.0.1'
  pod 'AppCenter/Analytics', '~> 2.0.1'
  pod 'AppCenterReactNativeShared', '~> 2.0.0'

  # Pods for NFIBEngage
  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/React'
  pod 'React-DevSupport', :path => '../node_modules/react-native/React'
  pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
  pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'

  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

  target 'NFIBEngageTests' do
    inherit! :search_paths
    # Pods for testing
  end

  use_native_modules!
end

target 'NFIBEngage-tvOS' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for NFIBEngage-tvOS



end

target 'PROD' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for PROD
  # pod 'AppCenter/Push', '~> 1.3.0'
  pod 'AppCenter/Crashes', '~> 2.0.1'
  pod 'AppCenter/Analytics', '~> 2.0.1'
  pod 'AppCenterReactNativeShared', '~> 2.0.0'

  # Pods for NFIBEngage
  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/React'
  pod 'React-DevSupport', :path => '../node_modules/react-native/React'
  pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
  pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'

  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

end

target 'QA' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for QA
  # pod 'AppCenter/Push', '~> 1.3.0'
  pod 'AppCenter/Crashes', '~> 2.0.1'
  pod 'AppCenter/Analytics', '~> 2.0.1'
  pod 'AppCenterReactNativeShared', '~> 2.0.0'

  # Pods for NFIBEngage
  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/React'
  pod 'React-DevSupport', :path => '../node_modules/react-native/React'
  pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
  pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'

  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

end

target 'UA' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for UA
  # pod 'AppCenter/Push', '~> 1.3.0'
  pod 'AppCenter/Crashes', '~> 2.0.1'
  pod 'AppCenter/Analytics', '~> 2.0.1'
  pod 'AppCenterReactNativeShared', '~> 2.0.0'

  # Pods for NFIBEngage
  pod 'React', :path => '../node_modules/react-native/'
  pod 'React-Core', :path => '../node_modules/react-native/React'
  pod 'React-DevSupport', :path => '../node_modules/react-native/React'
  pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
  pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
  pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
  pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
  pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
  pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
  pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
  pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
  pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
  pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
  pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'

  pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
  pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
  pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
  pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

end

If anyone can add the above configuration to that MVP and then run pod install && react-native run-ios and not get this error:

AppDelegate.h:8:9: fatal error: 'React/RCTBridgeDelegate.h' file not found
#import <React/RCTBridgeDelegate.h>

that is what I am trying to accomplish myself.

    The one thing that i really annoying about React-Native when working with setting environment for Dev, Staging and Production is… anytime when you’re using «pod install» bcoz you want to adding more library, this error gonna be happen React/RCTBridgeDelegate.h file not found. 

    Only React-Native 0.60 and later because it’s using pod and pod will be link only main target project. Since RN 0.60 project.xcworkspace will be mainly project for Xcode and Pods than project.xcodeproj that not rely with Pods. You’ll never build and run succes caused by this error.

    The main problem is your new environment not associate with pod that linked to main target project if you try to duplicated, it will be work while you’re not using pod install again. I will discuss from one picture that leading to solve this issue but it’s just temporarily solution, it’s gonna be happen again liked i said when you’ve using pod install.

[ Xcode 11.3 ]

The solution is… refer above image.
1. click on root project name on the left panel.

2. click on root project name under section PROJECT.

3. click tab info

4. this is the main target project that was created from inititlaize, you may have decided it for Production environment.
5. this is the Dev environment target project that having issue React/RCTBridgeDelegate.h file not found. that even duplicated from 4.
6. this is pod linked when 5. having issue, you will see this is «none» value, you must change this to be match the main pod like 4. both Debug «none» to «Pods-project.debug» and Release «none» to Pods-project.release»

    Then build it again, everything should be fine. But reminded! this is temporarily solution, it’s work when you never use pod install again. If you use pod install, this issue will be back to you then once you’ve pod install just update pod linked from «none» to «Pods-project.debug» and «Pods-project.release» again. liked step 6. That’s it.

Hope this will help you out the blocking. See you next thread. Stay home, Stay safe.

I have created a new project called auth using react-native init auth at terminal.When i tried to run the project using react-native run-ios. The build failed and gave a error ‘React/RCTBridgeDelegate.h’ file not found.

Tried to update the react native version

react-native run-ios at terminal in mac

I expect the build to be successful and see the ios simulator
The actual result which i got is build failed and hence cant see the simulator

1) Solution

The issue is related to cocoapods dependency manager. Do the following to fix this:

  1. Open the terminal and go to your project ios directory
  2. Type in pod init (If it doesn’t exist) and then pod install
  3. Open the workspace project and delete the build from ios folder
  4. Run react-native run-ios from terminal.

It should work now.

2) Solution

In my case the libPods-FOO.a library had somehow become unlinked when I did a pod update && pod install. To see if this applies to you:

  1. In Xcode, check under Project Navigator:

    [Your Project Name] --> Targets --> [Your target name] --> General
    
  2. Scroll down to Frameworks, Libraries and Embedded Content

  3. If you don’t have a libPods-XXXX.a in there (where XXXX is your project name) then add it:

    1. Click the ‘+’ sign to add the libPods library
    2. Search for libPods in the search box
    3. Choose the libPods-XXXX.a and click Add.

Add library

libPods.....a

3) Solution

Just a hint: for those of you using the M1 Macs, pod install won’t work. You should use arch -x86_64 pod install as stated in this issue

4) Solution

The issue happened due to the missing of React schema in cocoapods dependency. to resolve follow these steps:

  1. open project in XCode using ios/{project name}.xcworkspace file

  2. From menu bar -> click Product-> Scheme -> Manage Scheme

  3. It will open a modal -> click on the + button

  4. List item

  5. New modal -> In target DropDown select React and click okay

  6. close the modal and rebuild project Project — Build

it will resolve the issue.

5) Solution

In case you have Mac with an Apple M1 chip, It can be resolve in two ways,

#SOLUTION 1

  1. Open Application->Utilites->Terminal.app
  2. Right-click, Terminal.app -> Get Info -> General-> Enable «Open using Rosetta»
  3. Restart Terminal

enter image description here

#SOLUTION 2

  1. From terminal execute

sudo arch -x86_64 gem install ffi

  1. Go to iOS directory and execute

arch -x86_64 pod install

6) Solution

I did what @Vahid suggested, but I also had another issue. A set of instructions I was following told me to pull the related .xcodeproj file into my actual project and then manually link a few different files.

These steps were not necessary and were creating the issue for me.

I was following this:
https://github.com/frostney/react-native-ibeacon

But it’s better to use this npm package and follow their instructions:
https://www.npmjs.com/package/react-native-ibeacons

7) Solution

It can happen if you are using mac on M1 chip and trying to run the app on a simulator. Try to install iterm2 from official site(https://iterm2.com/), and launch it with Rosetta(Applications -> Right click on 'Iterm2' app -> "Get info" -> Check "Open using Rosetta"). Then run:

  1. sudo gem install cocoapods
  2. rm -rf /Users/{USERNAME}/.cocoapods/repos/cocoapods
  3. Go to your project folder and run cd ./ios && pod install
  4. Run build with npx react-native run-ios
8) Solution

In this particular project, certain targets were not working. I noticed the broken targets with this error were missing libPods-myProjectName.a. Under Targets -> General tab, «Frameworks, Libraries and Embedded Content» I pressed the «+» icon and searched for «pods» and added «pods-myProjectName.a» and now it seems to work. This might not be applicable to you, but I am adding this as another possibility of what might be wrong.

9) Solution

The simple pod install command did not work for me. If you have M1 Mac then try using.

arch -x86_64 pod install 
10) Solution

follow this steps :

  1. Select your project on Xcode

  2. Go to Build Settings

  3. In Search path tab select Header Search Path and add this values for both debug and release

    $(inherited)

    ${PODS_ROOT}

    ${SRCROOT}/../../../ios/Pods/Headers (Make sure to set it to recursive)

enter image description here

11) Solution

[Mac OSX]
I updated the cocoapods version
brew upgrade cocoapods

12) Solution

For me adding arm64 to Excluded Architectures section works.

enter image description here

Comments Section

There is already podfile existing.when i try to run pod init, it says /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory

if already exist ignore pod init and just type «pod install» and it will take time to be finished, please don’t forget to delete the build file from ios folder and then type react-native run-ios

did you type «pod install» ? It will overwrite the current one

@Vahid I have removed build folder and run pod install and try to build app. But it failed with the same error React/RCTBridgeDelegate.h’ file not found in AppDelegate.h file

@sejn I have same issue, have you found any solution?

My understanding is if you set your terminal app to use Rosetta mode, then arch is not needed.

In my case, this did not resolve the issue. I set both Xcode 13.3 and terminal to Rosetta mode. Xcode build fails regardless. I’m not 100% sure, yet, if my issue relates to this. Something else could be breaking that makes this error appear. Still investigating.

not getting this file, libPods-zzz.a ,any help?

@GaneshGodshelwar check for Pods-zzz.a

solved by adding this lines in podfile, as we were using env dev and pro abstract_target ‘KidsCommonPods’ do # <- Add this # React Native Maps dependencies target ‘KidsDev’ do end target ‘KidsPro’ do end

This worked for me. I also had an invalid import on <FirebaseCore/FirebaseCore.h> and this solved the issue on M1 mac. Thank you!

Thank you . This solved the a lot of issue

I don’t see React in the dropdown menu

I dont see React in Drop Down Menu

Related Topics
project
react-native
new-operator
build

Mentions
Muhammad Haidar
Cobberboy
Arun Sankar S
Abdelhedi Hlel
Vecop Wall
Marco Galindo
Sa Ra Va Na N Dm
Laurent
Vahid
Efkan
Saranya
Kirill Kohan

References
stackoverflow.com/questions/56916798/react-rctbridgedelegate-h-file-not-found

Issue

I have created a new project called auth using react-native init auth at terminal.When i tried to run the project using react-native run-ios. The build failed and gave a error ‘React/RCTBridgeDelegate.h’ file not found.

Tried to update the react native version

react-native run-ios at terminal in mac

I expect the build to be successful and see the ios simulator
The actual result which i got is build failed and hence cant see the simulator

Solution

The issue is related to cocoapods dependency manager. Do the following ot fix this:

  1. Open the terminal and go to your project ios directory
  2. Type in pod init (If it doesn’t exist) and then pod install
  3. Open the workspace project and delete the build from ios folder
  4. Run react-native run-ios from terminal.

It should work now.

Answered By — Vahid

Понравилась статья? Поделить с друзьями:
  • Appcrash проводник ошибка как исправить windows 7
  • Appcrash ошибка как исправить windows server 2012
  • Appcrash ошибка как исправить windows server 2008
  • Appcrash ошибка как исправить windows 7 64 explorer exe
  • Appcrash как исправить на windows 7 c0000005