指南
Firebase Remote Config教程
使用@capgo/capacitor-firebase-remote-config
Capacitor插件:Firebase Remote Config
安装
bun add @capgo/capacitor-firebase-remote-config
bunx cap sync
此插件暴露的内容
activate- 提供最后一次获取的配置给 getter。fetchAndActivate- 执行 fetch 和激活操作。fetchConfig- 从 Remote Config 服务中获取和缓存配置。getBoolean- 根据给定的键获取布尔值。
示例用途
activate
使最后获取的配置可供获取器使用。
import { FirebaseRemoteConfig } from '@capgo/capacitor-firebase-remote-config';
await FirebaseRemoteConfig.activate();
fetchAndActivate
执行 fetch 和 activate 操作。
import { FirebaseRemoteConfig } from '@capgo/capacitor-firebase-remote-config';
await FirebaseRemoteConfig.fetchAndActivate();
fetchConfig
从 Remote Config 服务中获取并缓存配置。
import { FirebaseRemoteConfig } from '@capgo/capacitor-firebase-remote-config';
await FirebaseRemoteConfig.fetchConfig();
getBoolean
根据给定的键获取布尔值。
import { FirebaseRemoteConfig } from '@capgo/capacitor-firebase-remote-config';
await FirebaseRemoteConfig.getBoolean({} as GetBooleanOptions);
全局参考
- GitHub: https://github.com/Cap-go/capacitor-firebase/tree/main/packages/remote-config
- 文档: /docs/plugins/firebase-remote-config/
继续使用 @capgo/capacitor-firebase-remote-config
如果您正在使用 使用@capgo/capacitor-firebase-remote-config 为了规划原生插件工作,连接它 Capgo 原生插件目录 Capgo 原生插件目录中的产品工作流程 Capacitor 由Capgo提供的插件 Capacitor 由Capgo提供的插件的实现细节 添加或更新插件 添加或更新插件的实现细节 Ionic企业插件替代品 Ionic企业插件替代品中的产品工作流程 Capgo 原生构建 Capgo 原生构建中的产品工作流程