Sentry-react-native: 'React/RCTBridgeDelegate.h' file not found

Created on 12 Oct 2017  ·  7Comments  ·  Source: getsentry/sentry-react-native

OS:

  • [ ] Windows
  • [X] MacOS
  • [ ] Linux

_Platform:_

  • [X] iOS
  • [ ] Android

Output of node -v && npm -v && npm ls --prod --depth=0

v6.9.1
5.4.2
[email protected] /Users/**/MyProject
├── [email protected]
├── [email protected]
├── [email protected]

Config:

Sentry.config('https://[email protected]/...', {
  // No updates to config
}).install()

I have following issue:
'React/RCTBridgeDelegate.h' file not found when installing into project using cocapods

Podfile

platform :ios, '9.0'

target 'MyProject' do
  use_frameworks!

  pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga/Yoga.podspec'
  pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'Core',
    'RCTText',
    'RCTAnimation',
    'RCTNetwork',
    'RCTActionSheet',
    'BatchedBridge',
    'RCTWebSocket',
    'RCTImage',
    'DevSupport',
    'RCTNetwork',
    # Add any other subspecs you want to use in your project
    'RCTLinkingIOS'
  ]

  # Pods for MyProject
  # Sentry
  pod 'SentryReactNative', :path => '../node_modules/react-native-sentry'

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

Steps to reproduce:

  • yarn add react-native-sentry
  • react-native link react-native-sentry
  • Update Podfile to what you see above ^^
  • pod install
  • Build in XCode

Actual result:

  • Build fails with 'React/RCTBridgeDelegate.h' file not found

Expected result:

  • Successful build

screen shot 2017-10-12 at 2 18 48 pm

Most helpful comment

removed 'BatchedBridge' from pod file,

after I got 'React/RCTNetworking.h' file not found,

did anyone get the same issue?

react - 16.0.0
react-native - 0.54
XCode Version 9.3 (9E145)

All 7 comments

Issue resolved:

  1. Delete React native sentry from Libraries folder in workspace
  2. Remove RNSentry.a from Build Phases -> Link Binary With Libraries

Could not find these steps in the docs anywhere - It may be more helpful to move Setup with CocoaPods into the Manual Setup for iOS docs, and outline that it must be done instead of react-native-link

Hey, thanks for pointing this out, I will fix this.

removed 'BatchedBridge' from pod file,

after I got 'React/RCTNetworking.h' file not found,

did anyone get the same issue?

react - 16.0.0
react-native - 0.54
XCode Version 9.3 (9E145)

@MaheshNandam I have the same issue as you. Did you manage to solve it?

hey @pmadruga,

I managed to solve by downgrading RN Version to 0.50.4.

Thanks.

Downgrading RN version is not the solution.

Sometimes I think, cold-war is going on between React-Native & Xcode.

Some or the other issues arises.

not working

Was this page helpful?
0 / 5 - 0 ratings