Open PDMackinnon opened 3 years ago
OK, looked at the finished version and the answer is that the codelab gives out of date code which should be the following (as copied from the final xcode version) :
override func viewDidLoad() {
super.viewDidLoad()
GIDSignIn.sharedInstance()?.presentingViewController = self
GIDSignIn.sharedInstance()?.restorePreviousSignIn()
handle = Auth.auth().addStateDidChangeListener() { (auth, user) in
if user != nil {
MeasurementHelper.sendLoginEvent()
self.performSegue(withIdentifier: Constants.Segues.SignInToFp, sender: nil)
}
}
}
@PDMackinnon thanks for reporting this. @morganchen12 can you submit the fix?
Some errors arising when using latest GoogleSignIn version (5.0.2) So downgraded to version 4.4.0 after some stackoverflow research...
... leads to new build errors with the unsupported lines in Appdelegate.swift :
Missing arguments for parameters 'sourceApplication', 'annotation' in call
So for everything to work, need to know and specify the version of GoogleSignIn and for all supplied code to consistently work to the specified API