Skip to content

PAM Native Firebase

Every PAM Native product runs on the PAM runtime. Install and verify PAM first, create a Native application, and add this package through PAM Composer:

Terminal window
curl -fsSL https://github.com/push-in/pam/releases/latest/download/install.sh | sh
pam doctor
pam init my-app --template native
cd my-app
pam composer require pushinbr/pam-native-firebase
pam doctor
pam native dev
$firebase = new Firebase();
$firebase->logEvent(
'checkout_completed',
['order_id' => $order->id, 'amount' => $order->total],
fn (FirebaseOperationState $state, ?string $error) => null,
);
$firebase->fetchRemoteConfig(fn (RemoteFetchResult $result) => null);

Firebase exposes app configuration, Analytics, Remote Config, Messaging token lifecycle, Installations, and Crashlytics. FirebaseAppOptions defines named runtime apps; RemoteFetchResult distinguishes activation, fetch, throttle, and failure; FirebaseFeatureFlagLoader bridges Remote Config to the official flags package.

Android reads .pam/google-services.json and uses pinned main Firebase modules, not discontinued KTX artifacts. Apple uses official Swift Package products. PAM Native retains notification presentation/routing; this package owns Firebase services and tokens. Never ship service-account/server credentials.

Support: PAM Native 0.6.x, Android API 26+, iOS 15+, plus project credentials.

Public types also include RemoteFetchState, the integer-backed state carried by RemoteFetchResult, and the auto-discovered FirebasePluginProvider.