指南
Firebase Remote Config 教程
使用 @capgo/capacitor-firebase-remote-config
Capacitor 插件用于 Firebase Remote Config
安装
bun add @capgo/capacitor-firebase-remote-config
bunx cap sync
此插件暴露了什么
activate- 使最后获取的配置可供获取器使用。fetchAndActivate- 执行 fetch 和 activate 操作。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 Enterprise 插件替代方案 为 Ionic Enterprise Plugin Alternatives 的产品工作流程 Capgo 原生构建 为 Capgo 原生构建的产品工作流程