Per iniziare
Copia un prompt di configurazione con i passaggi di installazione e la guida markdown completa per questo plugin.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-firebase-app`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/firebase-app/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
Puoi usare il nostro setup assistito dall'IA per installare il plugin. Aggiungi le skill Capgo al tuo strumento di IA usando il seguente comando:
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-pluginsPoi usa il seguente prompt:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-firebase-app` plugin in my project.Se preferisci la configurazione manuale, installa il plugin eseguendo questi comandi e segui le istruzioni specifiche per piattaforma qui sotto:
bun add @capgo/capacitor-firebase-appnpx cap syncImporta
Sezione intitolata “Import”import { FirebaseApp } from '@capgo/capacitor-firebase-app';Avvio rapido
Sezione intitolata “Quick start”import { FirebaseApp } from '@capgo/capacitor-firebase-app';
const result = await FirebaseApp.getName();console.log(result);Esempio: getOptions
Sezione dal titolo “Esempio: getOptions”import { FirebaseApp } from '@capgo/capacitor-firebase-app';
const result = await FirebaseApp.getOptions();// The result holds sensitive values: use it without logging it.Errori comuni
Sezione intitolata “Errori comuni”- Sync nativo: esegui
npx cap syncdopo gli aggiornamenti dei plugin. - Fonte di verità: fidati
src/definitions.tsnel repo GitHub.
Panoramica API
Sezione intitolata “Panoramica API”getName
Sezione intitolata “getName”Ottieni il nome di questa app.
import { FirebaseApp } from '@capgo/capacitor-firebase-app';
const result = await FirebaseApp.getName();console.log(result);getOptions
Sezione intitolata “getOptions”Ottieni le opzioni di configurazione di questa app.
import { FirebaseApp } from '@capgo/capacitor-firebase-app';
const result = await FirebaseApp.getOptions();// The result holds sensitive values: use it without logging it.Riferimento ai tipi
Sezione: “Type Reference”GetNameResult
Sezione intitolata “GetNameResult”export interface GetNameResult { /** * The unique name of this app. * * @since 0.1.0 */ name: string;}GetOptionsResult
Sezione intitolata “GetOptionsResult”export interface GetOptionsResult { /** * API key used for authenticating requests from your app. * * @since 0.1.0 */ apiKey: string; /** * Google App ID used to uniquely identify an instance of an app. * * @since 0.1.0 */ applicationId: string; /** * The database root URL. * * @since 0.1.0 */ databaseUrl: string; /** * The Project Number. * * @since 0.1.0 */ gcmSenderId: string; /** * The Google Cloud project ID. * * @since 0.1.0 */ projectId: string; /** * The Google Cloud Storage bucket name. * * @since 0.1.0 */ storageBucket: string;}GetPluginVersionResult
Sezione intitolata “GetPluginVersionResult”export interface GetPluginVersionResult { /** * The semantic version of this plugin. * * @since 8.0.1 */ version: string;}Fonte di verità
Sezione intitolata “Fonte di verità”Questa pagina è generata dal src/definitions.ts. Riesegui la sync quando il API pubblico cambia upstream.
Continua da Getting Started
Sezione intitolata “Continua da Getting Started”Se stai usando Per iniziare per pianificare le operazioni della dashboard e di API, collegalo a Panoramica API per i dettagli di implementazione in Panoramica di API, Introduzione per i dettagli di implementazione in Introduzione, Chiavi API per i dettagli di implementazione delle chiavi API, Dispositivi per i dettagli di implementazione in Devices, e Bundle per il dettaglio di implementazione in Bundles.