メインコンテンツにジャンプ
@capgo/capacitor-firebase-functions 統合 オープンソース

Firebase Functions Capacitor プラグイン

Capacitor プラグイン for Firebase Cloud Functions

インストール

bun add @capgo/capacitor-firebase-functions bunx cap sync
npm, pnpm または yarn
  • npm install @capgo/capacitor-firebase-functions
  • pnpm add @capgo/capacitor-firebase-functions
  • yarn add @capgo/capacitor-firebase-functions

ガイド

Firebase Functionsを使用する方法については、Capacitorを参照してください

Capgoを使用した@capgo/capacitor-firebase-functions

CapacitorプラグインはFirebase Cloud Functions用です。

インストール

bun add @capgo/capacitor-firebase-functions
bunx cap sync

bunx cap sync codeプラグインのネイティブcodeをプロジェクトにコピーします。プラグインのアップグレード後は再度実行してください。

インポート

import { FirebaseFunctions } from '@capgo/capacitor-firebase-functions';

APIの概要

メソッド 説明
callByName 特定の関数を呼び出す
callByUrl 特定の関数をURLで呼び出す
useEmulator アプリをCloud Functions エミュレータと通信させる

例

callByName()

関数を名前で呼び出す。

import { FirebaseFunctions } from '@capgo/capacitor-firebase-functions';

const result = await FirebaseFunctions.callByName({ name: 'myFunction' });
console.log(result);

callByUrl()

関数をURLで呼び出す。

import { FirebaseFunctions } from '@capgo/capacitor-firebase-functions';

const result = await FirebaseFunctions.callByUrl({
  url: 'https://us-central1-my-project.cloudfunctions.net/myFunction',
});
console.log(result);

useEmulator()

アプリをクラウド関数エミュレータと通信するように設定する。

import { FirebaseFunctions } from '@capgo/capacitor-firebase-functions';

await FirebaseFunctions.useEmulator({ host: "127.0.0.1" });

フルリファレンス

続けて使用する@capgo/capacitor-firebase-functions

使用中の場合 使用中の@capgo/capacitor-firebase-functions ネイティブ プラグインの作業を計画するには、__CAPGO_KEEP_0__ プラグイン ディレクトリと接続する。 続けて使用する@Capgo/__CAPGO_KEEP_1__-firebase-functions Capgo製品ワークフローについての Capgo プラグインディレクトリに Capacitor プラグインは Capgo によって Capgo製品ワークフローについての Capacitor プラグインは Capgo によって プラグインの追加または更新 プラグインの追加または更新についての実装詳細 Ionic Enterprise プラグインの代替 Capgo製品ワークフローについての Ionic Enterprise プラグインの代替、 Capgo ネイティブビルド Capgo製品ワークフローについての Capgo ネイティブビルド

FAQ

Firebase Functions プラグインのFAQ

Firebase Functions プラグインを Capacitor アプリにインストールするにはどうすればいいですか?

Run "bun add @capgo/capacitor-firebase-functions" (or "npm install @capgo/capacitor-firebase-functions"), then run "bunx cap sync" so the iOS and Android projects pick up the native code. Import it from "@capgo/capacitor-firebase-functions" in your app code.

React、Vue、Angularと一緒に@capgo/capacitor-firebase-functionsを使用することはできますか?

はい。Firebase FunctionsはCapacitorパッケージなので、Capacitor内で実行される任意のWebフレームワークと一緒に使用できます。 例えば、Ionic、React、Vue、Angular、Svelte、または単純なJavaScriptなどです。

Which Capacitor version does @capgo/capacitor-firebase-functions support?

Capgo plugins follow Capacitor's major version: use the plugin major version that matches your Capacitor major version (for example plugin v8 with Capacitor 8). The compatibility table in the GitHub README lists the maintained versions.

Capgoの@capgo/capacitor-firebase-functionsは無料でオープンソースですか?

Yes. The source code is public on GitHub at https://github.com/Cap-go/capacitor-firebase/tree/main/packages/functions and the package is free to install from npm. Bug reports and pull requests are welcome.

Can I update code that uses Firebase Functions without an App Store review?

Installing or upgrading the plugin changes native code, so it needs a new store build. After that, JavaScript, HTML and CSS changes that call the plugin can ship instantly with Capgo live updates.

Firebase Functionsの変更をアプリレビューの待たずに配信する

プラグインがストアビルドに追加されたら、CapgoライブアップデートはユーザーにJavaScript、HTML、CSSの変更を数分で反映します。

Capgoから始めましょう