Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FUIEmailAuth undeclared

I am Using FIrebaseUI login for IOS but for email part I am getting undeclared error. What can be the cause?

This is my code.

   FUIAuth *authUI = [FUIAuth defaultAuthUI];
    authUI.delegate = self;
    NSArray<id<FUIAuthProvider>> *providers = @[
                                                [[FUIGoogleAuth alloc] init],
                                                [[FUIFacebookAuth alloc] init],
                                                [[FUIEmailAuth alloc] init],
                                                ];
    authUI.providers = providers
like image 313
Bhumika Singhal Avatar asked Aug 28 '26 05:08

Bhumika Singhal


1 Answers

According to the Firebase documentations, you don't need to do anything on iOS side. You just configure it from the console of Firebase. Once you've enabled email and password authentication, the email button will appears (see bottom if email button doesn't show up).

AppDelegate.swift

FirebaseApp.configure()
let authUI = FUIAuth.defaultAuthUI()
authUI?.providers = [FUIGoogleAuth.init(), FUIFacebookAuth.init()]
// To hide the email button from AuthUI:
authUI?.isSignInWithEmailHidden = true // see bottom

AppDelegate.m

FUIAuth *authUI = [FUIAuth defaultAuthUI];
authUI.delegate = self;
NSArray<id<FUIAuthProvider>> *providers = @[
                                            [[FUIGoogleAuth alloc] init],
                                            [[FUIFacebookAuth alloc] init],
                                            ];
authUI.providers = providers;
// To hide the email button from AuthUI:
authUI.signInWithEmailHidden = YES; // see bottom

Note, as of FirebaseUI 6.0.0, the email button is missing. I cannot find any documentation nor any codes to re-enable it. signInWithEmailHidden property is gone. When I set the pod version to below '6.0.0', the problem is resolve. FirebaseUI 5.2.2 has email button.

Podfile

pod 'FirebaseUI/Auth', '< 6.0.0'
like image 120
John Pang Avatar answered Aug 30 '26 23:08

John Pang



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!