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

Flutter iOS端Google登录出现PlatformException如何解决?

iOS端集成Google Sign-In时抛出异常(Web/Android运行正常)

我正在项目中集成Google Sign-In功能,Web和Android端运行正常,但iOS端抛出如下异常:

if (errorCode is String && (errorMessage == null || errorMessage is String) && !buffer.hasRemaining) { 
  throw PlatformException(code: errorCode)
  throw PlatformException(code: errorCode, message: errorMessage as String?, details: errorDetails, stacktrace: errorStacktrace)
} else {
  throw const FormatException('Invalid envelope');
}

我的开发环境信息如下:

  • Flutter:稳定版3.10.2,运行在macOS 13.3.1(darwin-arm64),语言环境tr-TR
    • Flutter路径:/Users/furkanbora/code/flutter
    • 框架版本:9cd3d0d9ff(2023-05-23)
    • 引擎版本:90fa3ae28f
    • Dart版本:3.0.2
    • DevTools版本:2.23.1
  • Android工具链:Android SDK 33.0.1
    • SDK路径:/Users/furkanbora/Library/Android/sdk
    • 目标平台:android-33,build-tools 33.0.1
    • Java版本:OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
  • Xcode:14.3版本
    • Xcode路径:/Applications/Xcode.app/Contents/Developer
    • Build版本:14E222b
    • CocoaPods版本:1.12.1
  • 开发工具:
    • Chrome:版本113.0.5672.126
    • Android Studio:2021.3版本,已安装Flutter和Dart插件
    • VS Code:1.78.2版本,Flutter扩展3.64.0
  • 已连接设备:
    • iPhone 14模拟器(iOS 16.4)
    • macOS桌面端
    • Chrome浏览器

项目后端使用Firebase,仅iOS端出现该问题。

内容的提问来源于stack exchange,提问作者Furkan Bora

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.20 14:42:41