指南
Firebase 远程配置教程
使用 @capgo/capacitor-firebase-remote-config
Capacitor Firebase 远程配置插件
安装
bun add @capgo/capacitor-firebase-remote-config
bunx cap sync
本插件暴露的内容
activate- 将最后获取的配置暴露给 getter。fetchAndActivate- 执行 fetch 和 activate 操作。fetchConfig- 从 Remote Config 服务中 fetch 和缓存配置。getBoolean- 以布尔值获取给定键的值。
示例用法
activate
将最后获取的配置暴露给 getter。
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 服务中 fetch 和缓存配置。
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 Enterprise Plugin Alternatives 为 Ionic Enterprise Plugin Alternatives 的产品工作流程 Capgo 原生构建 为 Capgo 原生构建的产品工作流程