firebase / firebase-ios-sdk

Firebase SDK for Apple App Development
https://firebase.google.com
Apache License 2.0
5.68k stars 1.49k forks source link

FirebaseCore/FIRComponentRegistrant.h file not found #2490

Closed levieggert closed 5 years ago

levieggert commented 5 years ago

[REQUIRED] Step 2: Describe your environment

[REQUIRED] Step 3: Describe the problem

When I build the Xcode project workspace, I get the following error: 'FirebaseCore/FIRComponentRegistrant.h' file not found

Steps to reproduce:

I have an iOS project running in Xcode 10.1.

My pod file is setup like so:

platform :ios, '11.0' use_frameworks!

pod 'Firebase'
pod 'FirebaseAuth'
pod 'FirebaseCore'
pod 'FirebaseDynamicLinks'
pod 'FirebaseFirestore'
pod 'FirebaseMessaging'
pod 'FirebaseStorage'

After running pod install, terminal output the following:

Using Firebase (5.18.0) Using FirebaseAnalytics (5.7.0) Using FirebaseAnalyticsInterop (1.2.0) Using FirebaseAuth (5.4.0) Using FirebaseAuthInterop (1.0.0) Using FirebaseCore (5.3.1) Using FirebaseDatabase (5.1.0) Using FirebaseDynamicLinks (3.4.1) Using FirebaseFirestore (0.16.1) Using FirebaseInstanceID (3.7.0) Using FirebaseMessaging (3.3.2) Using FirebaseStorage (3.1.0)

What I've Tried:

I've tried the following:

  1. In Xcode, Clean Build Folder
  2. Delete Podfile.lock
  3. Delete project .xcworkspace
  4. Run pod install again
  5. Open .xcworkspace, build again, same error occurs.
firebasecore_issue
google-oss-bot commented 5 years ago

I found a few problems with this issue:

paulb777 commented 5 years ago

Please run pod update to update to a recent version of FirebaseFirestore. It's now at version 1.0.2.

levieggert commented 5 years ago

Hey Paul,

The real culprit was an additional dependency I was installing, GeoFirestore. https://github.com/imperiumlabs/GeoFirestore-iOS It was knocking the FirebaseFirestore version down. Thank you for the quick response and pointing that out to me.

All the best, Levi

2Fit commented 5 years ago

Hi levieggert, did you find a solution to install both (Firestore and GeoFirestore)? Thanks in advantage.

levieggert commented 5 years ago

Hey 2Fit, It's been awhile since I've been in that code, but I ended up just using GeoFire to create a geohash and dropping GeoFirestore. I remember at the time GeoFirestore would only query document id's and then you had to make additional query's on those id's to get the actual document. I didn't like that because it required 2 document reads. So I ended up looking through their code to see how they were querying documents and implemented something that allowed me to query for documents based on a location coordinate and radius.