我大约三周前发布了一个新版本。一切都工作正常,直到一些 iOS 设备卡在启动屏幕中。当我在 Mac 上调试此问题时,出现此错误:
flutter:[firebase_database/permission-denied] 客户端无权访问所需数据。
当我在 Android 中运行该应用程序时,它工作正常。此外,iPad 或 iPhone 13 等某些设备上也会出现这种情况。iPhone 14 上有时也会出现这种情况,但它会自动再次开始正常运行。
当我更改 Wifi 或移动数据时,应用程序会在 iOS 设备中再次开始运行。这些是我在实时数据库规则中使用的权限:
{
"rules": {
".read": true,
".write" : true,
}
}
如果我的应用程序代码存在问题,那么我们应该在发布应用程序后就遇到此问题。
you should try this once ,you might want to restrict access to authenticated users only:
{
"rules": {
".read": "auth != null",
".write": "auth != null",
}
}