Firebaseui-ios: "No such module 'FirebaseAuthUI'" using cocoapods

Created on 19 May 2018  路  10Comments  路  Source: firebase/FirebaseUI-iOS

Hi,

I am getting the above error trying to start a project using CocoaPods version 1.5.2 in xcode 9.3.1 and iOS 11.3. My Podfile looks like this:

`# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

target 'Poker411' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!

# Pods for Poker411
pod 'GoogleMaps'
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Crash'
pod 'FirebaseUI'
pod 'FirebaseUI/Auth'
pod 'FirebaseUI/Google'
pod 'FirebaseUI/Facebook'

end`

...and I have built this project from scratch and tried all of the stock answers found on StackOverflow such as adding $(SRCROOT), $(inherited), and even the full path to the header location to the search path. The error is on the import statement (this is Swift 4.1) in my AppDelegate.swift file:

import FirebaseAuthUI

Most helpful comment

Change your import to import FirebaseUI.

This was a recent change in FirebaseUI 5 and is noted as part of our release notes. If there's out of date docs, please let me know.

All 10 comments

Change your import to import FirebaseUI.

This was a recent change in FirebaseUI 5 and is noted as part of our release notes. If there's out of date docs, please let me know.

https://firebase.google.com/docs/auth/ios/firebaseui <-- instructions here say "import FirebaseAuthUI"

Is there also a change to imports such as FirebaseTwitterAuthUI?

Yes, all imports should be changed to import FirebaseUI.

Thanks for pointing that out, I'll go fix it.

May i use this space for another question instead of opening a new issue?
I seem to be signing in okay, but the callback is not being called. There are a couple of issues which are similar, but do not directly apply and have not helped me fix this. As this app has no usefulness without account login, I am trying to take care of this all from the AppDelegate. I have declared the FUIAuthDelegate protocol for the AppDelegate class, set:

authUI?.delegate = self

in "didFinishLaunchingWithOptions" method, and implemented the callback method in AppDelegate, which xcode bridged to:

authUI(_ authUI: FUIAuth, didSignInWith authDataResult: AuthDataResult?, error: Error?)

...since this is Swift 4 (Originally wrote it as

"authUI(_ authUI: FUIAuth, didSignInWith user: FIRUser?, error: Error?)"

...and xcode changed it to the above). I create and display the authViewController and it does display and the login procedure seems to go as normal, but the callback is never called. If you'd like I can open a new issue, but I'm betting the issue is more me than you so I am asking here first :-)
Screenshots of code are attached.

screen shot 2018-05-23 at 12 35 26 pm
screen shot 2018-05-23 at 12 35 01 pm

Thank you for your time.

Currently the auth view controller can't be used as the root view controller of your app. This was fixed recently, but hasn't made its way out in a release yet.

Other than that your code looks fine.

Ah thank you. I'll use a NavigationController as root and drop the auth into that then. Thank you for your time, you've saved a lot of mine!

Closing for now, feel free to comment here if you run into more issues.

Hi Morgan,
Just a note FYI as the only inconvenience this causes is a messy log file, but in my app, for all of the Twitter classes I get a message saying that the module is present in two paths which boil down to /yada/yada/yada/TwitterCore and /yada/yada/yada/TwitterKit and that one of them will be used and which one is undefined. Can one of these paths be safely deleted?

That's #402, and is a bug within TwitterKit. You can't really delete the paths since they're part of framework bundles in your app.

I'm not sure when this issue will be fixed, but the only real way to avoid it for now is to not use Twitter Auth.

Oh! Sorry for the poorly researched post then, but thank you very much for responding!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

morganchen12 picture morganchen12  路  7Comments

crrobinson14 picture crrobinson14  路  9Comments

platoputhur picture platoputhur  路  4Comments

Tayphoon picture Tayphoon  路  6Comments

ghowen picture ghowen  路  5Comments