FirebaseUI-iOS
FirebaseUI-iOS copied to clipboard
passwordSignUpViewController() delegate function not called
Environment
- Swift 5
- iOS version: 12.4
- Firebase SDK version: 6.5.0
- FirebaseUI version: 8.0.3
- CocoaPods Version: 1.7.5
Issue
I'm having trouble customizing the sign up view controller by implementing this in my AuthUI delegate:
func passwordSignUpViewController(forAuthUI authUI: FUIAuth, email: String) -> FUIPasswordSignUpViewController {
return FUICustomPasswordSignUpViewController(nibName: "FUICustomPasswordSignUpViewController",
bundle: Bundle.main,
authUI: authUI,
email: email)
}
Even though I'm using the FUICustomPasswordSignUpViewController.xib
and .swift files from the sample project, the delegate function is not called and the view is not customized. However, it works for the email entry view controller with the exact same setup.
I believe this must be a bug in FirebaseUI (or sample code) since this behavior is also the case in the sample project fresh out of master. All other views I've tried are customized (including the email entry view just before the sign up view).
Screenshots from sample project
Add extra requireDisplayName parameter:
func passwordSignUpViewController(forAuthUI authUI: FUIAuth, email: String, requireDisplayName: Bool) -> FUIPasswordSignUpViewController {
return FUICustomPasswordSignUpViewController(nibName: "FUICustomPasswordSignUpViewController",
bundle: Bundle.main,
authUI: authUI,
email: email,
requireDisplayName: requireDisplayName
)
}
@leialey 's solution works for me. But indeed the code here: https://firebase.google.com/docs/auth/ios/firebaseui is incorrect.