Closed brianramirez closed 8 years ago
I run into the same problem today. Could you figure out some solution?
There are also some problems in other projects like GeoFire. https://github.com/firebase/geofire/issues/4
Same problem for me.
I "fixed" it by importing it manually. @AlexandreBarbier
@AppWerkstatt thanks I'll do this too or maybe add a git subtree to keep the lib up to date?
@mcdonamp Why'd you close this issue? It still doesn't work with the Pod. I also had to add FirebaseUI manually.
@mcdonamp Hi! same situation here. Is it possible to reopen or write the work around for manual installation?
Hey guys, I'm currently on my phone so I'm keeping it short. The fastest fix is simply downloading the project and import it manually. You habe to add an bridging header to your project if you are using swift. In this heander, import the classes you want to expose to Swift. In adittion you habe to modify the import headers so that they are correct. For Firebase itself I used the pod, which still works.
Anyway, the problem pods problem hasent been solved yet, so a re-open would be nice.
I'm also thinking about forking this project. There may be some additional features which would be awesome to add. @AlexandreBarbier
So the issue is that it didn't find Firebase/Firebase.h
, which is somewhat strange, since Firebase should be pulled in as a dependency and it should be available.
Can you post a sample Podfile and the output of pod install
so I can try to repro? Which version of CocoaPods are you using? I just upgraded to 1.0.0, and it seems to work, so I assume that won't be a problem. What version of the Firebase library are you pulling in? If it's not 2.5.x, it's possible that you're trying to use a version that requires a bridging header. Can you try updating your master spec repo, since it might be out of date and pulling in an older version of Firebase
.
A minimal example that should work is:
use_frameworks!
target 'YourTarget' do:
pod 'FirebaseUI/Core', '~> 0.3'
end
Output is:
Analyzing dependencies
Downloading dependencies
Installing Firebase (2.5.1)
Installing FirebaseUI (0.3.2)
Generating Pods project
Integrating client project
...
Then I was able to open my xcworkspace
and import Firebase
no problem.
For now I'm seeing something something curious in my Podfile.lock:
PODS:
- Alamofire (3.4.0)
- AzureSDK-iOS (1.2.4)
- Firebase (2.5.1)
- FirebaseUI/Core (0.3.2):
- Firebase (~> 2.2)
- MBProgressHUD (0.9.2)
DEPENDENCIES:
- Alamofire (~> 3.0)
- AzureSDK-iOS
- Firebase (~> 2.5.0)
- FirebaseUI/Core (~> 0.3)
- MBProgressHUD (~> 0.9.2)
SPEC CHECKSUMS:
Alamofire: c19a627cefd6a95f840401c49ab1f124e07f54ee
AzureSDK-iOS: faa868ba69b1c5abb27ecaec4046cf3a3fba4abd
Firebase: 3565ea88b830f28f2c77ecc524622bc71a20d085
FirebaseUI: 95621dce04f0313495c86e1fba503254e0ec48b1
MBProgressHUD: 1569cf7ace17a8bac47aabfbb8580a49690386d1
PODFILE CHECKSUM: ace366909c417de6ceaf055a6e61768da05f513f
COCOAPODS: 1.0.0
Particularly there's a - Firebase (~> 2.2)
dependency under FirebaseUI
. Maybe this is causing the problems.
The Firebase (~> 2.2)
only means "use 2.2 or above", which CocoaPods should turn into 2.5.0
when running pod install
, since this is the latest version in the specs repo. It does mean that if someone's local specs repo is out of date, it could pull in something as old as 2.2, which I don't think has the correct modulemap, and thus could cause this problem (so you'd have to add a bridging header). pod repo update
should solve this problem.
I just reproduced the error in a new empty XCode project. You can find it here: https://github.com/maksymilian-majer/FirebaseUITest
Just clone the repo run pod install
and then build in XCode. The build fails with the following error:
▸ Compiling FirebaseArray.m
❌ /.../FirebaseUITest/Pods/FirebaseUI/FirebaseUI/Core/Implementation/FirebaseArray.m:33:9: 'Firebase/Firebase.h' file not found
#import <Firebase/Firebase.h>
Man, this is weird. I did the same thing last night and it worked--but I can now repro in your project. What version of CocoaPods are you using? I updated from 0.39 to 1.0, and it sounds like the Framework linking may be broken there. Just confirmed (by running on my project from yesterday with CocoaPods 1.0) that this is indeed the case.
Looks like in https://github.com/firebase/FirebaseUI-iOS/blob/master/FirebaseUI.podspec#L18-L20 we might want to add (even though overall we check in $(PODS_ROOT)
):
core.xcconfig = { 'FRAMEWORK_SEARCH_PATHS' => '"${PODS_ROOT}/Firebase/Frameworks"' }
Let me tinker a little more with this and I'll see what we can find.
For all reading: in the future, to help with clarifying issues like this, we've got an Issue Template that gets this information (such as CococaPods version, etc.) which will help us debug. Please use this template for submitting all issues as we may just close improperly formatted issues in the future.
I'm also using CocoaPods v 1.0.
For now, we'll go ahead and say that FirebaseUI doesn't officially support CocoaPods 1.0.0 (which officially came out last week). Use 0.39 while we work on getting this fixed for you :)
Ok, I'm going to close out this issue given that we know what the problem is (FirebaseUI doesn't work with CocoaPods 1.0 yet). We'll have a fix in the next day or so. In the mean time, I've updated the README (2cf678b65e10eac981190a6e6ab331f7bef9ab08) and the Issue Tracker (82ae6c3) to let people know of the issue and to use CocoaPods 0.39 (which you can install by doing: sudo gem install cocoapods-0.39.0
I believe).
Is this still relevant? Should we stay on cocoapods-0.39.0?
No, this is no longer relevant. You should use CocoaPods 1.3.1 and Xcode 8.3.3 or higher.
Our goal is generally to keep FirebaseUI compatible with the latest versions of CocoaPods and Xcode. If we're ever lacking this compatibility, that's probably a bug.
I noticed an issue today when adding FirebaseUI to my Swift project. I add it to my Podfile like:
pod 'FirebaseUI/Core', '~> 0.3'
It installs correctly but fails on build with the message: "FirebaseDataSource.m - Firebase/Firebase.h file not found".
I know that the Firebase framework is there since my project is already using it and it was installed with Cocoapods. Cleaning and re-building doesn't fix the issue.
Any suggestions?