React-native-firebase: Firebase.h not found, manual install

Created on 29 Jun 2018  路  20Comments  路  Source: invertase/react-native-firebase

screen shot 2018-06-29 at 2 50 20 pm

^ This is in a up to date create-react-native-app project thats clean besides this.

    "react": "16.3.1",
    "react-native": "~0.55.2",
    "react-native-firebase": "^4.2.0"

I have gone about manual installation in 2 ways, first creating a Firebase folder and manually linking everything.

The second I just installed the package and did react-native link


Both are resulting in the error above. I tried moving Firebase.h to the Firebase folder when I did things fully manually and that did not help either. Even though that is in the RNFirebase.xcodeproj header search paths.

Please help :(

General Build Error iOS Stale

All 20 comments

I have managed to get around this locally (not sure how) by heavily messing with RNFirebase.xcodeproj build phases and settings.

That does nothing for me though as no one in the office can clone these repos and have them build since those changes do not persist.

I'm experiencing the same issue with RN v0.55.0. I was able to install using pods but I would prefer to not use pods in this project. Any help regarding header/framework search paths would be great!

Experiencing same issue - any help would be great

Same issue for myself as well

For what it's worth, I was also averse to using pods, but I've found in general the short term pain leads to long term gain when you start relying heavily on the firebase sdks, which are themselves always being updated with their own bug fixes etc.
If you do choose to go down the pods path, here is my working podfile (ignore any irrelevant libs, although the RN ones are neccesary):
````
platform :ios, '9.0'
target 'Sinc' do

rn_path = '../node_modules/react-native'
rn_maps_path = '../node_modules/react-native-maps'

pod 'GoogleSignIn'


pod 'react-native-fbsdk', :subspecs => [
'Core',
'Login',
'Share',
], :path => '../node_modules/react-native-fbsdk/iOS'

pod "yoga", :path => "#{rn_path}/ReactCommon/yoga/yoga.podspec"
pod 'React', :path => "#{rn_path}", :subspecs => [
'BatchedBridge', # Required For React Native 0.45.0+
'Core',
'DevSupport',
'RCTActionSheet',
'RCTAnimation',
'RCTGeolocation',
'RCTImage',
'RCTLinkingIOS',
'RCTNetwork',
'RCTSettings',
'RCTText',
'RCTVibration',
'RCTWebSocket',
# Add any other subspecs you want to use in your project
]

# react native maps

# RNFirebase
pod 'Firebase', '~> 5.0.1'
pod 'Firebase/Auth'
pod 'Firebase/Analytics'
pod 'Firebase/Core'
pod 'Firebase/Crash'
pod 'Firebase/Database'
pod 'Firebase/DynamicLinks'
pod 'Firebase/Messaging'
pod 'Firebase/RemoteConfig'
pod 'Firebase/Storage'
pod 'Firebase/Firestore'


pod 'react-native-youtube', :path => '../node_modules/react-native-youtube'

end

post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "React"
target.remove_from_project
end
end
end

````

Thank you for the config :)

Maybe some of these other folks can but for me, not allowed to use Pods at work because of how they play with other packages and also git workflow in general with pods :(

Ah yeah I understand sorry

I'm getting the same exact error.

I installed manually because it's an existing project and I'd like to avoid using Pods.

@code-matt can you remember any build setting changes you made? I've spent so many hours researching and making updates to no avail.

       "react-native": "16.4.1",
       "react-native": "0.56.0",
       "react-native-firebase": "^4.3.7"

Any help would be appreciated.

@drewandre did you ever fix your issues?

@mycoberago Unfortunately there were so many, I cant not recall. I was messing with the header search paths in the RNFirebase.xcodeproj and also its link binary with libraries and copy . You would have to do this every npm install though and not practical.

Thanks @code-matt

See https://github.com/invertase/react-native-firebase/issues/1016#issuecomment-384027481 for more detailed manual installation steps which may solve this. I've encountered the same issue with Cocoapods all of a sudden.

@erandagan thank you!! This did it!

This issue has been automatically marked as stale because it has not had recent user activity. It will be closed if no further activity occurs. Thank you for your contributions.

Closing this issue after a prolonged period of inactivity. If this is still present in the latest release, please feel free to create a new issue with up-to-date information.

Hi, I just read the cocoapods documentation for Firebase, and states that the firebase main pod needs to be added then all the submodules you need, this solved for sure the problem for me:

  # Taken from https://cocoapods.org/pods/Firebase 'Firebase' pod need to be added then any library including core.
  pod 'Firebase', '~> 5.0.1'
  pod 'Firebase/Core', '~> 5.0.1'
  pod 'Firebase/Auth', '~> 5.0.1'
  pod 'Firebase/Database', '~> 5.0.1'
  pod 'Firebase/Firestore', '~> 5.0.1'
  pod 'Firebase/Messaging', '~> 5.0.1'

Good luck, and lets dream with a day you just react-native install X, and everything works out of the box 馃槃

Lying, keeps failing!!!

So, i'm starting to understand one thing from cocoapods

This is just an hypothesis: There are a lot of subdependencies that maybe on POD its allowed to not specify a version, so you get these projects, you ron pod install and get maybe the version you asked for or whichever version it likes or its available because someone just indicated that any version is valid, so i notice there are some cache folder for cocoapods which you can clean by
https://gist.github.com/mbinna/4202236

A partner of me, has the same podfile as me, it works for him, but not for me ohhh which would be the reason,

During install all the versions and subdependencies are listed, and i notice he had cached some versions and since i just started in the company and i ran pod install these days i got some newer and MESSY dependencies

So one could blame cocoapods for these architecture decisions, or one can blame developers of pods not writing down specific versions son subdependencies, but at the end you will die of sorrow in an issue thread :'(

Right now, i just enforced the dependencies and versions my partner has with the hope to fix this mess, still not able to find Firebase.h

NPM (typescript/javascript) and Gradle (Java) can suffer the same problem. That's why for each of these you really need to keep an eye on the associated .lock files (or specify the dependencies in gradle) and then once you get something working once, if it fails you can at least git bisect to find where the bad thing happened and what it was. Messy and detail-oriented at the same time

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bitfabrikken picture bitfabrikken  路  52Comments

adirzoari picture adirzoari  路  50Comments

jasan-s picture jasan-s  路  137Comments

tranty9597 picture tranty9597  路  79Comments

gilbert picture gilbert  路  65Comments