I try to use GoogleSignIn in my project, but I have problem when call GIDSignIn.sharedInstance().signIn()
I received warning below:
[Warning] Attempting to load the view of a view controller while it is deallocating is not allowed and may result in undefined behavior (<SFAuthenticationViewController: 0x7fccba008c00>)
And in "GIDSignInDelegate", always had error "The user canceled the sign-in flow."
func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error?) {}
I searched on somewhere but could not got any solutions for this case, thanks for reading, I hope you will help me :((
UPDATE 1: add GIDSignInUIDelegate implementation
extension MyClass: GIDSignInUIDelegate {
func sign(inWillDispatch signIn: GIDSignIn!, error: Error!) {
print(#function)
}
func sign(_ signIn: GIDSignIn!, present viewController: UIViewController!) {
print(#function)
self.present(viewController, animated: true, completion: nil)
}
func sign(_ signIn: GIDSignIn!, dismiss viewController: UIViewController!) {
print(#function)
self.dismiss(animated: true, completion: nil)
}
}
and I received message below:
[Warning] Attempting to load the view of a view controller while it is deallocating is not allowed and may result in undefined behavior (<SFAuthenticationViewController: 0x103023800>)
UPDATE 2: Some time alert (in image blow) is shown, then I tap on cancel and it can not shown again Image here