gpt4 book ai didi

ios - Flutter::iOS多种方案不同的Firebase项目

转载 作者:行者123 更新时间:2023-12-01 18:35:35 25 4
gpt4 key购买 nike

我有多个环境方案设置dev和prod,因此每个环境都有两个firebase项目。我在iOS上设置了prod和dev的两个方案,并按照https://www.tengio.com/blog/multiple-firebase-environments-with-flutter/链接的说明逐步进行操作。但是,当我尝试使用Google单一登录进行登录时,出现此错误Unhandled Exception: PlatformException(google_sign_in, Your app is missing support for the following URL schemes我缺少什么?

错误日志:

[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: PlatformException(google_sign_in, Your app is missing support for the following URL schemes: com.googleusercontent.apps.xxxxxx-yyyyy, NSInvalidArgumentException)
#0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
#1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:321:33)
<asynchronous suspension>
#2 MethodChannel.invokeMapMethod (package:flutter/src/services/platform_channel.dart:349:48)
#3 MethodChannelGoogleSignIn.signIn (package:google_sign_in_platform_interface/src/method_channel_google_sign_in.dart:45:10)
#4 GoogleSignIn._callMethod (package:google_sign_in/google_sign_in.dart:227:42)
<asynchronous suspension>
#5 GoogleSignIn._addMethodCall.<anonymous closure> (package:google_sign_in/google_sign_in.dart:291:16)
#6 _rootRunUnary (dart:async/zone.dart:1134:38)
#7 _CustomZone.runUnary (dart:async/zon<…>
Lost connection to device.

谢谢

最佳答案

我认为您需要获取REVERSED_CLIENT_ID
在google-services.json或GoogleService-Info.plist中找到并将其添加到URL方案的XCode中
enter image description here
您可以检查此链接以获取更多详细信息

https://firebase.google.com/docs/auth/ios/google-signin

关于ios - Flutter::iOS多种方案不同的Firebase项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59879869/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com