You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Flutter集成Firebase谷歌认证报错:未找到GoogleService-Info.plist且未传入clientId

解决iOS端Google认证提示GoogleService-Info.plist找不到的问题
  • 确认plist已被Xcode正确识别
    别只把文件复制到iOS文件夹就完事,打开Xcode,把GoogleService-Info.plist拖拽到Runner目录下,勾选「Copy items if needed」和「Create groups」。之后去Runner -> Build Phases -> Copy Bundle Resources里检查,确保这个plist在列表中,没有的话点「+」添加进去。

  • 重新执行FlutterFire配置
    运行flutterfire configure,确保选中iOS目标平台,让工具重新生成并关联配置文件。之后执行flutter clean、flutter pub get,再重新编译iOS项目。

  • 手动指定Client ID绕过配置问题
    如果上面的操作都没解决,直接从GoogleService-Info.plist里复制CLIENT_ID字段的值,初始化GoogleSignIn的时候手动传入:

    final GoogleSignIn googleSignIn = GoogleSignIn(
      clientId: '你的iOS Client ID字符串',
    );
    
  • 检查文件路径是否正确
    确保GoogleService-Info.plist放在ios/Runner/目录下,别放到其他子文件夹里,Xcode只会默认扫描这个路径下的配置文件。

内容的提问来源于stack exchange,提问作者ASAD HAMEED

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.24 20:57:21