Google 登录在 IOS 上崩溃,但在 Android 上运行良好
Posted
技术标签:
【中文标题】Google 登录在 IOS 上崩溃,但在 Android 上运行良好【英文标题】:Google sign in crashes on IOS but works fine on Android 【发布时间】:2021-05-13 16:28:50 【问题描述】:我仍然进行了所有研究,但当我点击谷歌登录时,应用程序会崩溃。
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.googleusercontent.apps.390674890211-klbqki2me0m8fjccmbkt..........</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>fb36858607......</string>
</array>
</dict>
</array>
这是我的解散
final googleSignIn = GoogleSignIn(
scopes: [
'email',
'profile',
],
hostedDomain: '',
clientId: '',
);
我也试过了,但还是崩溃
final googleSignIn = GoogleSignIn(
scopes: [
'email',
'https://www.googleapis.com/auth/contacts.readonly',
],
hostedDomain: '',
clientId: '',
);
pubspec.ymal
firebase_auth: ^1.1.4
cloud_firestore: ^2.1.0
firebase_storage: ^8.0.6
google_sign_in: ^5.0.2
flutter_facebook_login: ^3.0.0
flutter 运行 -v 文件
flutter run -v file
错误信息
PlatformException(google_sign_in, You must specify |clientID| for |GIDSignIn|, NSInvalidArgumentException, null)
【问题讨论】:
你在错误信息中得到什么? 是...google_sign_in,您必须指定|clientID|对于 |GIDSignIn|... 这是错误消息 【参考方案1】:如果有人遇到同样的问题,这就是为什么我必须回答以供将来参考。
这是解决问题的链接
the github link solve the problem
【讨论】:
以上是关于Google 登录在 IOS 上崩溃,但在 Android 上运行良好的主要内容,如果未能解决你的问题,请参考以下文章
在 iOS 上创建实时房间后,Google Play 游戏服务崩溃
更新 google plus 和 facebook SDK 后应用程序在设备 (ios 6) 上崩溃
使用 Google 登录无法在 Android 上运行(仅在 iOS 上) - Flutter