UNPKG

capacitor-firebase-kit

Version:

Provider-less Firebase Kit - Universal Firebase services integration for React, React Native, and Capacitor apps

29 lines 1.07 kB
import { createFirebaseKitProxy } from '../plugin-proxy'; /** * Register the legacy Capacitor plugin for backward compatibility * * @deprecated Use the new provider-less `firebaseKit` API instead * @example * ```typescript * // Old way (deprecated) * import { registerCapacitorPlugin } from 'capacitor-firebase-kit'; * const FirebaseKit = registerCapacitorPlugin(); * * // New way (recommended) * import firebaseKit from 'capacitor-firebase-kit'; * await firebaseKit.initialize({ ... }); * ``` */ export async function registerCapacitorPlugin() { try { const { registerPlugin } = await import('@capacitor/core'); const FirebaseKitNative = registerPlugin('FirebaseKit', { web: () => import('../plugin-implementation').then(m => new m.FirebaseKitPluginImplementation()), }); return createFirebaseKitProxy(FirebaseKitNative); } catch (_a) { throw new Error('Capacitor not found. Please install @capacitor/core to use the legacy plugin API.'); } } //# sourceMappingURL=capacitor-plugin.js.map