Google 로그인을 앱에 통합하여 Google 계정을 사용하여 Firebase를 인증하려고합니다.AppDelegate가 Swift 3의 'GIDSignInDelegate'프로토콜을 따르지 않습니다.
사용 : 아직
// Sign-in flow has finished and was succcesful if error is nil:
func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error!){
if let error = error {
print(error.localizedDescription)
return
}
guard let authentication = user.authentication else { return }
let credential = FIRGoogleAuthProvider.credential(withIDToken: authentication.idToken,
accessToken: authentication.accessToken)
// Finished disconnecting user from the app succesfully if error is nil:
func sign(_ signIn: GIDSignIn!, didDisconnectWithUser user: GIDGoogleUser!,
withError error: Error!) {
// Perform any operations when the user disconnects from app here.
// ...
}
AppDelegate에
에GIDSignInDelegate
의 두 가지 방법을 구현 3.11.1
8
설명서에 따르면 이러한 방법을 signIn not sign이라고합니다. https://developers.google.com/identity/sign-in/ios/api/protocol_g_i_d_sign_in_delegate-p#pub-methods. GIDSignInDelegate에 대한 헤더 파일과 동일합니까? – Gruntcakes
@Grunt func sign() 및 func signIn()을 시도했습니다. 그것은 효과가 없었습니다. https://firebase.google.com/docs/auth/ios/google-signin –
문제 탐색기 (⌘4)로 이동하여 오류 옆의 공개 삼각형을 클릭하면 누락 된 메소드가 표시됩니다. – vadian