ios - 仅在 iOS / Flutter 中获取远程配置失败
问题描述
我已经为我的 Flutter 应用程序设置了 Firebase 远程配置。
final remoteConfig = RemoteConfig.instance;
final defaultValues = <String, dynamic>{
'default_url': '',
};
await remoteConfig.setDefaults(defaultValues);
RemoteConfigValue(null, ValueSource.valueStatic);
try {
await remoteConfig.setConfigSettings(RemoteConfigSettings(
fetchTimeout: const Duration(seconds: 10),
minimumFetchInterval: const Duration(hours: 1),
));
await remoteConfig.fetchAndActivate();
} on PlatformException catch (exception) {
print(exception);
} catch (exception) {
print('Unable to fetch remote config. Cached or default values will be '
'used');
print(exception);
}
它在 Android 模拟器上运行良好,但只有在 iOS 模拟器和实际设备(我的 iPhone)上运行时才会输出错误。
flutter: Unable to fetch remote config. Cached or default values will be used
flutter: [firebase_remote_config/internal] internal remote config fetch error
而且,这在升级到 Flutter 2 (2.2.3) 后开始发生。
为什么会这样?
谢谢您的帮助。
解决方案
推荐阅读
- azure - 使用 Azure 存储模拟器进行 Dapr 本地开发
- python - 无法在python中搜索文件
- datasource - Grafana - 如何使用节点图面板和 influxdb 作为数据源
- android - 应用构建失败!!!无法解决问题。它显示任务':app:kaptDebugKotlin'的执行失败
- python - 使用 AWS EMR 在 mrjob 中传递参数
- kubernetes - Kubernetes operator 中的流量路由是如何发生的 - Journey of Egress traffic
- flutter - 如何在颤动中从 ListView 中删除默认的 ScrollBar?
- vue.js - Vue选项卡更改活动类的文本颜色
- flutter - Flutter中列内的容器之间不需要的间距
- sql - 从周数添加星期一的日期