Skip to main content
Back to plugins
@capgo/capacitor-firebase-functions
Tutorial
by github.com/Cap-go

Firebase Functions

Capacitor plugin for Firebase Cloud Functions

Guide

Tutorial on Firebase Functions

Using @capgo/capacitor-firebase-functions

Capacitor plugin for Firebase Cloud Functions.

Install

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

What This Plugin Exposes

  • callByName - Call a callable function by name.
  • callByUrl - Call a callable function by URL.
  • useEmulator - Instrument your app to talk to the Cloud Functions emulator.

Example Usage

callByName

Call a callable function by name.

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

await FirebaseFunctions.callByName({} as CallByNameOptions<RequestData>);

callByUrl

Call a callable function by URL.

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

await FirebaseFunctions.callByUrl({} as CallByUrlOptions<RequestData>);

useEmulator

Instrument your app to talk to the Cloud Functions emulator.

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

await FirebaseFunctions.useEmulator({} as UseEmulatorOptions);

Full Reference

Keep going from Using @capgo/capacitor-firebase-functions

If you are using Using @capgo/capacitor-firebase-functions to plan native plugin work, connect it with Capgo Plugin Directory for the product workflow in Capgo Plugin Directory, Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, Adding or Updating Plugins for the implementation detail in Adding or Updating Plugins, Ionic Enterprise Plugin Alternatives for the product workflow in Ionic Enterprise Plugin Alternatives, and Capgo Native Builds for the product workflow in Capgo Native Builds.