[英]Why am I getting a Firebase AppCheck error in iOS (Flutter app)
I've registered the Android and iOS versions of my Flutter app for AppCheck but it doesn't seem to work.我已经为 AppCheck 注册了 Flutter 应用程序的 Android 和 iOS 版本,但它似乎不起作用。 I chose App Attest instead of DeviceCheck for iOS since it was more simple and AppCheck is initialized in the main function when the app starts.
我为 iOS 选择了 App Attest 而不是 DeviceCheck,因为它更简单,并且 AppCheck 在应用程序启动时在主 function 中初始化。 I followed all the steps in the docs but it's not working.
我遵循了文档中的所有步骤,但它不起作用。 Now that I'm trying to use Firestore I'm getting these errors:
现在我正在尝试使用 Firestore,我收到了以下错误:
2022-08-21 21:05:15.939832+0300 Runner[62843:4842857] 9.2.0 - [FirebaseFirestore][I-FST000001] AppCheck failed: 'The operation couldn’t be completed. Too many attempts. Underlying error: The operation couldn’t be completed. The server responded with an error:
- URL: https://firebaseappcheck.googleapis.com/v1/projects/globe-rebrand/apps/1:521611501234:ios:b441db59d1e4181485f3ab:exchangeDeviceCheckToken
- HTTP status code: 400
- Response body: {
"error": {
"code": 400,
"message": "App not registered: 1:521611501234:ios:b441db59d1e4181485f3ab.",
"status": "FAILED_PRECONDITION"
}
}
'
2022-08-21 21:05:16.504869+0300 Runner[62843:4843044] 9.2.0 - [FirebaseFirestore][I-FST000001] WriteStream (155018878) Stream error: 'Permission denied: Missing or insufficient permissions.'
2022-08-21 21:05:16.505803+0300 Runner[62843:4843044] 9.2.0 - [FirebaseFirestore][I-FST000001] Write at users/ET41oMbo0bVcAAx0hv3QacIYfqC2 failed: Missing or insufficient permissions.
Few points you could check您可以检查的几点
Download Google services info.下载 Google 服务信息。 Plist from firebase
来自 firebase 的列表
Add it though xcode (very important) please don't add it directly to the ios folder通过 xcode 添加它(非常重要)请不要将它直接添加到 ios 文件夹
Add the reverse client id in info.plist在 info.plist 中添加反向客户端 ID
Make sure you call firebase.确保您致电 firebase。 Initialise before you make any other call
在您拨打任何其他电话之前进行初始化
If you downloaded the app from test flight to check please delete it and install the app from xcode once.如果您从试飞中下载了该应用程序进行检查,请将其删除并从 xcode 安装该应用程序一次。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.