
Trying to build project from XCode with target Simulator IPhone SE
just initialized fresh project on react native v0.49.3
Followed guide https://rnfirebase.io/docs/v3.0.*/installation/ios
Getting this error durig compilation
/node_modules/react-native-firebase/ios/RNFirebase/auth/RNFirebaseAuth.h:8:9: 'React/RCTEventEmitter.h' file not found
in RNFirebaseAuth:8 i have
#import <React/RCTEventEmitter.h>
Pod file
install! 'cocoapods', :deterministic_uuids => false
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
target 'moneybelka' do
platform :ios, '9.0'
# Uncomment this line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for ReactNativeFirebaseExamples
react_native_path = "../node_modules/react-native"
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'RNFirebase', :path => '../node_modules/react-native-firebase'
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
# pod 'Firebase/Analytics'
# pod 'Firebase/Crash'
# pod 'Firebase/DynamicLinks'
# pod 'Firebase/Messaging'
# pod 'Firebase/RemoteConfig'
# pod 'Firebase/Storage'
# pod 'Fabric'
# pod 'Crashlytics'
# pod 'CodePush', :path => '../node_modules/react-native-code-push'
end
i cleaned project (SHIFT+CMD+K)
i cleaned derived data
rm -rf /ios/build && rm -rf ~/Library/Developer/Xcode/DerivedData
Application Target Platform: IOS
Development Operating System: macOS High Sierra
Build Tools: XCode 9.0.1
React Native version: 0.49.3
RNFirebase Version: 3.0.4
Firebase Module: Auth
@coderany You've specified RNFirebase as a pod rather than linking using react-native link. This has changed in 3.0.X to simplify things and fix issues like this.
To resolve, you have two options:
1) Remove the RNFirebase pod, run pod install and then react-native link
2) You'll have to add the React pod to the pod file as explained in the 2.0.x instructions: https://rnfirebase.io/docs/v2.2.*/installation-ios#2.1)-Add-the-required-pods
Just want to share my solution (for my future reference also)
using pod, React-Native version 0.49.5
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'RNFirebase', :path => '../node_modules/react-native-firebase'
pod "yoga", :path => "../node_modules/react-native/ReactCommon/yoga"
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'BatchedBridge', # Required For React Native 0.45.0+
'Core',
]
Most helpful comment
@coderany You've specified
RNFirebaseas a pod rather than linking usingreact-native link. This has changed in 3.0.X to simplify things and fix issues like this.To resolve, you have two options:
1) Remove the
RNFirebasepod, runpod installand thenreact-native link2) You'll have to add the
Reactpod to the pod file as explained in the 2.0.x instructions: https://rnfirebase.io/docs/v2.2.*/installation-ios#2.1)-Add-the-required-pods