ガイド
Firebase Remote Configのチュートリアル
capgo/capacitor-firebase-remote-configを使用
CapacitorのFirebase Remote Configプラグイン
インストール
bun add @capgo/capacitor-firebase-remote-config
bunx cap sync
このプラグインが提供するもの
activate- 最後に取得した構成を取得者に提供します。fetchAndActivate- フェッチとアクティベーションを実行します。fetchConfig- Remote Configサービスから構成をフェッチしてキャッシュします。getBoolean- 指定されたキーに対応する値を取得します。
例外使用
activate
__CAPGO_KEEP_0__:を取得した最後の設定を取得者に提供します。
import { FirebaseRemoteConfig } from '@capgo/capacitor-firebase-remote-config';
await FirebaseRemoteConfig.activate();
fetchAndActivate
取得とアクティブ化の操作を実行します。
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
__CAPGO_KEEP_0__ キーに対する値を boolean 値として取得します。
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/