Closed alex-mironov closed 5 years ago
I didn't use cocoapods,I also got this error
Here's the correct link to manual linking guide
I had this issue when i updated from 58 -> 61.2.
I Fixed by deleting the contents of the Libraries
folder in the xCode Project.
Does anyone have a fix for this ?
@niv-breez have you tried to removing node_modules
/cleaning build project?
yes. working with react-native 0.60 + (without expo). this is my pod file:
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
target 'breez' do
# Firebase pods
pod 'Firebase/Core', '~> 6.3.0'
pod 'Firebase/Messaging', '~> 6.3.0'
pod 'Firebase/Analytics'
pod 'Firebase/Performance'
# Pods for breez
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-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'
# Pods for permissions
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-Camera', :path => "#{permissions_path}/Camera.podspec"
# Pods for PodTest
pod 'Fabric', '~> 1.10.2'
pod 'Crashlytics', '~> 3.14.0'
pod 'GoogleSignIn', '~> 5.0.0'
target 'breezTests' do
inherit! :search_paths
# Pods for testing
end
use_native_modules!
end
target 'breez-tvOS' do
# Pods for breez-tvOS
target 'breez-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
Just follow proper Upgrade Instructions using Upgrade Tool.
I actually missed that there are two times pod for React and React-Core: (had different but similar issue with BVLinearGradient missing RCTView.h file)
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
Isso fez a mágica, https://www.youtube.com/watch?v=JnZS5MoYKCY Você só precisa adicionar o React no esquema.
Cara, queria saber pq esse React nao aparece pra mim com esse icone de lib, aparece com esse circulo vermelho.
@Renathesco Aqui tbm.
Getting Same Error on newly created project with PODS. In Version "react-native": "0.61.5", Any solution for this??
Unfortunately I have the same error here.
I'd require more info about (for example, Podfile) to be able to help here.
I'd require more info about (for example, Podfile) to be able to help here.
Things I have tried:
post_install do |installer| installer.pods_project.targets.each do |target| if target.name == "React" target.remove_from_project end end end
This project was previously built by another developer. Apparently he did have a successful buid (not confirmed), this is the original podfile:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'AppName' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for AppName
pod 'GoogleSignIn', '~> 4.4.0'
pod 'Firebase/Core'
pod 'react-native-image-picker', :path => '../node_modules/react-native-image-picker'
pod 'RNIap', :path => '../node_modules/react-native-iap'
pod 'RNSVG', :path => '../node_modules/react-native-svg'
pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-community/async-storage'
pod 'react-native-background-timer', :path => '../node_modules/react-native-background-timer'
pod 'RNSentry', :path => '../node_modules/@sentry/react-native'
pod 'lottie-ios', :path => '../node_modules/lottie-ios'
pod 'lottie-react-native', :path => '../node_modules/lottie-react-native'
target 'AppNameTests' do
inherit! :search_paths
# Pods for testing
end
end
target 'AppName-tvOS' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for AppName-tvOS
target 'AppName-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
@devangelmotta I cannot see React Native in your Podfile
. How do you link against React Native? Did you have a look at our troubleshooting guide? Specifically this point may help you:
If you've manually linked React Native, but use CocoaPods for AsyncStorage, AsyncStorage will not be able to find React headers. You'll need to set header search path, or also consume React Native via CocoaPods.
We are facing same issue with React-Native version: 0.59.5
I also get that error with 0.59.9 and i have upgraded to 0.60.4 and the problem was resolved.
Any other ideas not mentioned above? I am having the problem in RN 0.62.2.
Sometimes as last resort I just regenerate the whole project with React Native CLI
Thanks @RichardLindhout Sounds like a last resort indeed...
It also makes sense to me that such a problem can be solved:
#import <RCTBridgeModule.h>
the problem was gone, but: (1) this doesn't sound like the way to go, since when somebody will clone the repo and run npm i
the problem will reappear, and (2) when I changed the import statement I get a similar error in another file, for #import <yoga/Yoga.h>
.#import "../../ReactCommon/yoga/yoga/Yoga.h"
, and I am still getting an error.You should def checkout this tool: https://react-native-community.github.io/upgrade-helper/
I can't upgrade without it :). But the 0.59.9 > 0.60 was a big one with autolinking so quite some changes.
I upgraded for android and it didn't take too much time (I am using https://github.com/react-native-community/rn-diff-purge). So for iOS, where this is the first time to make it work, I do start from a new project, kind of...
Current behavior
After adding Async Storage build fails with
fatal error: 'React/RCTBridgeModule.h' file not found
.Environment