flutter google sign in crash in ios

When I press the Google login button, the device is forced to shut down abnormally. Downgrade executed, but it doesn’t work. I also downloaded GoogleService-Info.plist normally and added it correctly.I don’t know what the problem is. It’s a matter of great importance to me. I would really appreciate it if you could let me know the solution.

—- Error —-

Lost connection to device. *** First throw call stack: (     0   CoreFoundation                      0x00007fff23e3cf0e __exceptionPreprocess + 350     1   libobjc.A.dylib                     0x00007fff50ba89b2 objc_exception_throw + 48     2   CoreFoundation                      0x00007fff23e5dc34 -[NSObject(NSObject)     doesNotRecognizeSelector:] + 132     3   CoreFoundation                      0x00007fff23e4190c ___forwarding___ + 1436     4   CoreFoundation                      0x00007fff23e43bf8 _CF_forwarding_prep_0 + 120     5   Runner                              0x000000010e58d072 +[GIDSignInCallbackSchemes relevantURLSchemes] + 393     6   Runner                              0x000000010e58d464 -[GIDSignInCallbackSchemes unsupportedSchemes] + 118     7   Runner                              0x000000010e58826f -[GIDSignIn signInWithOpti<…> 

—- My Code —–

GoogleSignIn _googleSignIn; @override  void initState() { super.initState();  _googleSignIn = GoogleSignIn(   scopes: <String>[     'email',     'profile',   ],   hostedDomain: "", );  _googleSignIn.onCurrentUserChanged.listen((GoogleSignInAccount account) {   print(account.email);   print(account.displayName);   print(account.id); }); }   _googleLogin() async {   try {     showDialog(         context: context,         child: SimpleDialog(           children: <Widget>[             Builder(               builder: (context) {                 _googleSignIn.signIn().then((GoogleSignInAccount value) {                   if (value != null) {                     _onSocialLoginButtonPressed(                         SocialSignInType.GOOGLE,                         SocialSignInArgs(                           email: value.email,                           name: value.displayName,                         ));                   } else {                     loginBloc.add(SocialLoginFailed('구글 로그인 실패'));                     Navigator.pop(context);                   }                 }).catchError((error) {                   loginBloc.add(SocialLoginFailed('구글 로그인 실패'));                   Navigator.pop(context);                 });                  return Container(                   child: CupertinoActivityIndicator(),                 );               },             )           ],         ),         barrierDismissible: false);   } catch (error, stack) {     print('---- Google LogIn Error:$error ----');     print('---- Google LogIn Stack:$stack ----');   } } 
Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.