question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'React/RCTBridge.h' file not found -- on custom sheme

See original GitHub issue
  • Plugin version:
  • Platform: iOS
  • OS version: all
  • Device manufacturer / model: all
  • React Native version (react-native -v): 0.55.4
  • Plugin config

Expected Behavior

Project builds on all shemes

Actual Behavior

Project build fails on custom sheme

Context

So, I’m trying to implement this library inside project that I am working on. I did manual installation of plugin, and everything works like a charm when I build debug, release or archive. Unfortunately when I try to run build on my custom shemes (copy of default shemes) it fails. I am not an iOS dev so Xcode is magic tools for me, and I’m stuck with this issue for 2 days… so I am politely asking for help.

Debug logs

`Build target RNBackgroundFetch of project RNBackgroundFetch with configuration Dev-ddm

CompileC /Users/dev/Library/Developer/Xcode/DerivedData/oneuimobile-byhzfkcqoncowcfrgsvxmuztwutb/Build/Intermediates.noindex/RNBackgroundFetch.build/Dev-ddm-iphonesimulator/RNBackgroundFetch.build/Objects-normal/x86_64/RNBackgroundFetch.o RNBackgroundFetch/RNBackgroundFetch.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler cd /Users/dev/Source/oneuimobileapp/src/node_modules/react-native-background-fetch/ios export LANG=en_US.US-ASCII export PATH=“/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin” /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu99 -fobjc-arc -fmodules -fmodules-cache-path=/Users/dev/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/dev/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -Os -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mios-simulator-version-min=8.0 -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/dev/Library/Developer/Xcode/DerivedData/oneuimobile-byhzfkcqoncowcfrgsvxmuztwutb/Build/Intermediates.noindex/RNBackgroundFetch.build/Dev-ddm-iphonesimulator/RNBackgroundFetch.build/RNBackgroundFetch-generated-files.hmap -I/Users/dev/Library/Developer/Xcode/DerivedData/oneuimobile-byhzfkcqoncowcfrgsvxmuztwutb/Build/Intermediates.noindex/RNBackgroundFetch.build/Dev-ddm-iphonesimulator/RNBackgroundFetch.build/RNBackgroundFetch-own-target-headers.hmap -I/Users/dev/Library/Developer/Xcode/DerivedData/oneuimobile-byhzfkcqoncowcfrgsvxmuztwutb/Build/Intermediates.noindex/RNBackgroundFetch.build/Dev-ddm-iphonesimulator/RNBackgroundFetch.build/RNBackgroundFetch-all-target-headers.hmap -iquote /Users/dev/Library/Developer/Xcode/DerivedData/oneuimobile-byhzfkcqoncowcfrgsvxmuztwutb/Build/Intermediates.noindex/RNBackgroundFetch.build/Dev-ddm-iphonesimulator/RNBackgroundFetch.build/RNBackgroundFetch-project-headers.hmap -iquoteRNBackgroundFetch/TSBackgroundFetch.framework -iquoteRNBackgroundFetch/TSBackgroundFetch.framework/_CodeSignature -iquoteRNBackgroundFetch/TSBackgroundFetch.framework/Headers -iquoteRNBackgroundFetch/TSBackgroundFetch.framework/Modules -I/Users/dev/Library/Developer/Xcode/DerivedData/oneuimobile-byhzfkcqoncowcfrgsvxmuztwutb/Build/Products/Dev-ddm-iphonesimulator/include -I…/…/react-native/React -I…/…/react-native/React/UIUtils -I…/…/react-native/React/CxxModule -I…/…/react-native/React/CxxBridge -I…/…/react-native/React/Inspector -I…/…/react-native/React/DevSupport -I…/…/react-native/React/Fabric -I…/…/react-native/React/Profiler -I…/…/react-native/React/CxxUtils -I…/…/react-native/React/Modules -I…/…/react-native/React/Views -I…/…/react-native/React/Base -I…/…/react-native/React/Fabric/Surface -I…/…/react-native/React/Views/SafeAreaView -I…/…/react-native/React/Views/ScrollView -I…/…/react-native/React/Base/Surface -I…/…/react-native/React/Base/Surface/SurfaceHostingView -I/Users/dev/Source/oneuimobileapp/src/node_modules/react-native-background-fetch/ios/…/…/…/React -I/Users/dev/Source/oneuimobileapp/src/node_modules/react-native-background-fetch/ios/…/node_modules/react-native/React -I/Users/dev/Library/Developer/Xcode/DerivedData/oneuimobile-byhzfkcqoncowcfrgsvxmuztwutb/Build/Intermediates.noindex/RNBackgroundFetch.build/Dev-ddm-iphonesimulator/RNBackgroundFetch.build/DerivedSources/x86_64 -I/Users/dev/Library/Developer/Xcode/DerivedData/oneuimobile-byhzfkcqoncowcfrgsvxmuztwutb/Build/Intermediates.noindex/RNBackgroundFetch.build/Dev-ddm-iphonesimulator/RNBackgroundFetch.build/DerivedSources -F/Users/dev/Library/Developer/Xcode/DerivedData/oneuimobile-byhzfkcqoncowcfrgsvxmuztwutb/Build/Products/Dev-ddm-iphonesimulator -F. -FRNBackgroundFetch -FRNBackgroundFetch -MMD -MT dependencies -MF /Users/dev/Library/Developer/Xcode/DerivedData/oneuimobile-byhzfkcqoncowcfrgsvxmuztwutb/Build/Intermediates.noindex/RNBackgroundFetch.build/Dev-ddm-iphonesimulator/RNBackgroundFetch.build/Objects-normal/x86_64/RNBackgroundFetch.d --serialize-diagnostics /Users/dev/Library/Developer/Xcode/DerivedData/oneuimobile-byhzfkcqoncowcfrgsvxmuztwutb/Build/Intermediates.noindex/RNBackgroundFetch.build/Dev-ddm-iphonesimulator/RNBackgroundFetch.build/Objects-normal/x86_64/RNBackgroundFetch.dia -c /Users/dev/Source/oneuimobileapp/src/node_modules/react-native-background-fetch/ios/RNBackgroundFetch/RNBackgroundFetch.m -o /Users/dev/Library/Developer/Xcode/DerivedData/oneuimobile-byhzfkcqoncowcfrgsvxmuztwutb/Build/Intermediates.noindex/RNBackgroundFetch.build/Dev-ddm-iphonesimulator/RNBackgroundFetch.build/Objects-normal/x86_64/RNBackgroundFetch.o

In file included from /Users/dev/Source/oneuimobileapp/src/node_modules/react-native-background-fetch/ios/RNBackgroundFetch/RNBackgroundFetch.m:9: In file included from RNBackgroundFetch/RNBackgroundFetch.h:14: …/…/react-native/React/Modules/RCTEventEmitter.h:8:9: fatal error: ‘React/RCTBridge.h’ file not found #import <React/RCTBridge.h> ^~~~~~~~~~~~~~~~~~~ 1 error generated. `

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:18 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
JulianKingmancommented, Dec 5, 2019

@christocracy it looks like you need to fix your header search paths. Check out this library: https://www.npmjs.com/package/react-native-fix-headers

1reaction
M165437commented, Jan 31, 2019

If you’re using Cocoapods, have a look at Configuring CocoaPods dependencies. Maybe you’re missing the React pod?

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native build failed: 'React/RCTBridge.h' file not found
In Xcode, go to the project scheme (Product -> Scheme -> Manage Scheme -> double click your project). Click on the 'Build' option...
Read more >
'React/RCTBridge.h' file not found #719 - GitHub
OS: Windows [*] MacOS Linux Platform: [ *] iOS Android SDK: @sentry/react-native [ *] react-native-sentry react-native version: 0.61.1.
Read more >
React Native build failed: 'React/RCTBridge.h' file not found ...
In Xcode, go to the project scheme (Product -> Scheme -> Manage Scheme -> double click your project). Click on the 'Build' option...
Read more >
React Native - Marketo Developers
React Native bridge is used for communicating between the JSX and native app layers. In our case, the host app will be able...
Read more >
React/Rctbridge.H' File Not Found? - ADocLib
xcode Product>Scheme>Manage Schemes click '+' at the Target to select React ... Next React Native build failed: 'React/RCTBridge.h' file not found didn't ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found