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

标签 ios flutter development-environment production-environment

我有多个环境方案设置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/

相关文章:

dart - Flutter中的弧形渐变?

java - 在 flutter 中添加Firebase包时出错

linux - 当项目位于 Linux 服务器上时,在 Windows 中实时开发环境

python - 当 python3 也安装时,如何管理 python2 的模块。在操作系统中

python - 有谁在 iOS 上成功安装了 Selenium 吗?

ios - UITableview 没有从 super View 中删除

ios - 恢复标识符在 6.0 警告之前的 ios 版本上不可用

ios - 使用 constraintsWithVisualFormat 的自动布局效果不佳

Flutter,如何实现导航过渡的手势?

javascript - 如何从 package.json 设置 NODE_ENV 以进行 react