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
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <React/RCTBridgeDelegate.h>
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate>
@property (nonatomic, strong) UIWindow *window;
@end
The error is telling me it can't find that import:
AppDelegate.h:8:9: fatal error: 'React/RCTBridgeDelegate.h' file not found
#import <React/RCTBridgeDelegate.h>
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:
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.
Reacted by Harsh M, spiderzys, yankovich, Aiyub, Emerson Herrera Diaz, Farhan Kassam, huqi, Sasan Rocky, Boris Yankov, kelvin knighton and 2 more
Reacted by Gabriel Fontoura Dos Santos, Hanns Adrian Böhme, Rupesh, Ankit Bhanderi, Cosmin Popescu and kelvin knighton
Reacted by Ailson Rocha Freire and Juan Camilo Morales
The solution was to correctly add multiple targets to my Podfile, which is done by using abstract_target, similar to what lifely did here: CocoaPods/CocoaPods#4863 (comment).
Reacted by Sakina Boriwala, filipeJamieAi, Valentyn Fomenko, Alex Beaman, Vipul Gupta, mobtex, Baraa Zakariya, Madeline McKune, Pedro Martins Melo, abezierandes and 15 more
Reacted by Dave Pol Lomber, Ivan Danilov, RYU, Gyoung Seok, Alex Lévy, sonalvish, tomcheung99 and 0xdove
Reacted by Moseqi, Dionny Prensa, Edward Camp, Edgar grs, valarisolutionsTeam, M Ibrahim Hayat, Jared, tomcheung99, RanjithkumarPop, tengrl and 2 more
You can fix this issue by installing the missing dependencies using pods.
These are the steps you should follow:
cd ios
pod install
After that, re-run the project. It should build with no errors.
Reacted by Brandon Orther, Anil Kumar Gurindapalli, Robin C Samuel, mwanjajoel, Mauricio De Leon, p12345vls, Cristiane Mayara, Avtar Nanrey, Moogtrails, Hugo Dias and 15 more
Reacted by Harsh M, Jed Helmers, Germán Goldenstein, Nate Oelke, Edward Camp, Dave Pol Lomber, pradhul Dev, Bogdan Balan, Mustafa Buyukcelebi, GunnarAK and 177 more
Reacted by Avtar Nanrey, Julio, Robin C Samuel, Matheus Neves and Ankit Bhanderi
Reacted by Luísa, Ayappa Reddy, Abraham Rosa Vargas, Devansh Shah, Alexandre M Montebelo, Meawstarbuck, Elene Botchoradze, BSxLeung and jeremy blong
Embarrassed to say I fought this problem for over an hour, eventually realizing that several commits earlier, I had deleted the tvOS targets in XCode without deleting the targets in the Podfile. This caused an error during pod install, but the phrasing of the error didn't make it clear that the pod install hadn't actually completed.
Thus, although I kept thinking I was running pod install, it wasn't actually happening, which resulted in this React/RCTBridgeDelegate.h' problem.
I doubt very much anyone else here is making such a silly mistake, but I thought I'd share anyway.
Hurray!
After having troubles for multiples hours, I fixed my issue.
When going in Edit Scheme > My Scheme, I had React (missing).
I added React back (click [-] on React, click [+], search React), then I still had this error. 🤔
Then, I saw a comment that said that React must be at the top of the list (it got added on the bottom).
I moved React to the top of the list, and now the error disappeared. 🎉
But now I have ReactNativeNavigation.h not found 😂
Reacted by Marcelo Silva
Reacted by abdelhedi hlel, Harsh M and FrozenPyrozen
In my case, there were 2 causes of that, constant problems with XCode 12: 1) dropping libPods-<ap;pname>.a from deps, 2) duplicated app:name.plist out of nowhere.
Activity
react-native-bot commentedon Jul 26, 2019
Thanks for submitting your issue. Can you take another look at your description and make sure the issue template has been filled in its entirety?
👉 Click here if you want to take another look at the Bug Report issue template.
ldco2016 commentedon Jul 29, 2019
Greetings, I am having a similar issue:
This is my
ios/NFIBEngage/AppDelegatehfile:The error is telling me it can't find that import:
slavikdenis commentedon Jul 30, 2019
Duplicate #25707 ?
ldco2016 commentedon Jul 31, 2019
@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 apod deintegratecleaned the XCode and rebuilt it and then refactored thePodfileand then successfully ranpod install.Afterwards, when I ran
react-native run-ios, thats when I started getting the following error:The file does indeed exist in my
Pods/Headers/Publicdirectory inside of theReact/folder that is inside ofReact-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
Podfileconfiguration it needs:If anyone can add the above configuration to that MVP and then run
pod install && react-native run-iosand not get this error:that is what I am trying to accomplish myself.
vnanaware commentedon Jul 31, 2019
After install pod also not working same error occured
act/RCTBridgeDelegate.h' file not found
#import <React/RCTBridgeDelegate.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
slavikdenis commentedon Jul 31, 2019
@ldco2016 well, for me it somehow worked. Please let us know, if you find the solution for your problem. Thanks
ldco2016 commentedon Jul 31, 2019
The solution was to correctly add multiple
targetsto myPodfile, which is done by usingabstract_target, similar to what lifely did here:CocoaPods/CocoaPods#4863 (comment).
phalera commentedon Aug 3, 2019
I see “scheme” in Xcode shows React(missing)
mohmmadmoussa1988 commentedon Aug 15, 2019
Did you find a solution for missing React in "scheme" ?
ham118 commentedon Sep 5, 2019
Facing the same problem "'React/RCTBridgeDelegate.h' file not found".
celodauane commentedon Sep 10, 2019
You can fix this issue by installing the missing dependencies using pods.
These are the steps you should follow:
After that, re-run the project. It should build with no errors.
Moseqi commentedon Sep 13, 2019
did you?
89 remaining items
BoKKeR commentedon Nov 10, 2020
Updating from rn0.62 to 0.63, dont forget to include every schema in your pods. Otherwise the pods will only work for the one main schema.
target 'myApp' do.... in your podsreact-native-community/upgrade-support#55
mouhsnimohamed commentedon Dec 7, 2020
here is what I did to fix this issue:
JasonFehr commentedon Dec 8, 2020
Embarrassed to say I fought this problem for over an hour, eventually realizing that several commits earlier, I had deleted the tvOS targets in XCode without deleting the targets in the Podfile. This caused an error during pod install, but the phrasing of the error didn't make it clear that the pod install hadn't actually completed.
Thus, although I kept thinking I was running pod install, it wasn't actually happening, which resulted in this React/RCTBridgeDelegate.h' problem.
I doubt very much anyone else here is making such a silly mistake, but I thought I'd share anyway.
yachaka commentedon Dec 31, 2020
Hurray!
After having troubles for multiples hours, I fixed my issue.
When going in
Edit Scheme>My Scheme, I hadReact (missing).I added React back (click [-] on React, click [+], search React), then I still had this error. 🤔
Then, I saw a comment that said that React must be at the top of the list (it got added on the bottom).
I moved
Reactto the top of the list, and now the error disappeared. 🎉But now I have
ReactNativeNavigation.hnot found 😂fix: try install missed pod
abdelhedydev commentedon Apr 27, 2021
This solution was solved my problem
joltup/rn-fetch-blob#461 (comment)
goul4rt commentedon May 7, 2021
I've just close xcode, remove node_modules and yarn.lock or package-lock.json
and inside ios folder:
pod deintegrate && pod cache clean -all && pod installafter this just run xcode again and it works
sunwooz commentedon May 13, 2021
I'm currently on a lower version than react-native .60 so do not make use of pods.
I had to remove the podfiles and uninstall pods with
pod deintegrate project.xcodeprojAcousticdesk commentedon May 21, 2021
Definitely, not the greatest solution and is not applicable to everyone, however, these are the steps that helped me in my situation:
npm installcd iospod installnpm run iosAdamLee321 commentedon Jun 1, 2021
Great find, my podfiles deployment target was 11.0 and my projects was set to 10.0. Thanks.
FrozenPyrozen commentedon Jul 27, 2021
If you are running mac os on m1, this answer can help with it https://stackoverflow.com/a/68543052/11792060 , works for me
FairWageFreelancing commentedon Sep 13, 2021
would you guys/gals PLEASE stop suggesting
pod install- jesus.talaikis commentedon Sep 21, 2021
In my case, there were 2 causes of that, constant problems with XCode 12: 1) dropping libPods-<ap;pname>.a from deps, 2) duplicated app:name.plist out of nowhere.