Search by

pushinbr / pam-native-firebase

Production Firebase Analytics, Remote Config, Messaging, Crashlytics and multi-app integration for PAM Native.

Maintainers

Package info

github.com/push-in/pam-native-firebase

Type:pam-native-plugin

pkg:composer/pushinbr/pam-native-firebase

Transparency log

Statistics

Installs: 186

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.2.1 2026-08-25 17:06 UTC

This package is auto-updated.

Last update: 2026-08-25 22:04:14 UTC


README

PAM Native Firebase

The Firebase services mobile teams need, behind PAM-native contracts.

Connect Analytics, Crashlytics, Remote Config, and Messaging without coupling application code directly to vendor SDK objects.

Latest version CI PHP Android iOS

Documentation · Quick start · What you can build · PAM ecosystem · Issues

Why PAM Native Firebase

Connect Analytics, Crashlytics, Remote Config, and Messaging without coupling application code directly to vendor SDK objects. The public API is strictly typed for PHP 8.5; expensive or frame-sensitive work stays in Rust or the platform SDK instead of crossing the application boundary every frame.

Best for A focused capability you can add to any PAM Native application
Native path Firebase Android SDK · Firebase Apple SDK
Application model Composer package + generated native integration
Design rule Independent module; no feed, vertical, or application template bundled

What you can build

  • Product analytics and conversion events
  • Crash diagnostics with application context
  • Push messaging and remotely controlled behavior

Quick start

Already have a PAM Native project? Add only this capability:

pam composer require pushinbr/pam-native-firebase
pam doctor --fix

New to PAM? Follow the five-minute PAM Native setup once, then return here. Your application stays a normal Composer project with a committed lockfile.

See it in action

Official Firebase integration for PAM Native: multi-app configuration, Analytics, Remote Config, Messaging token lifecycle, Installations and Crashlytics.

pam add firebase
pam doctor
$firebase = new Firebase();

$firebase->logEvent('checkout_completed', [
    'order_id' => $order->id,
    'amount' => $order->total,
], static function (FirebaseOperationState $state, ?string $error): void {
    // Handle native acceptance or failure.
});

$firebase->fetchRemoteConfig(static function (RemoteFetchResult $result): void {
    // Activated, fetched, throttled, or failed.
});

Android reads .pam/google-services.json through the PAM host and uses pinned main Firebase modules, not the discontinued KTX artifacts. Apple uses the official Firebase Swift Package products. Named apps can also be configured at runtime with FirebaseAppOptions.

Incoming notification presentation and routing remain owned by PAM Native's notification capability; this package owns Firebase token and service APIs.

What installation does

pam add firebase resolves the official compatible package, performs a non-mutating Composer preflight, updates the normal composer.json and composer.lock, refreshes generated native integration when required, and leaves the project ready for pam doctor validation.

Use pam packages to inspect availability and pam remove firebase to uninstall the capability safely. Direct Composer commands are an advanced interoperability path; PAM is the supported application workflow.

API guide

API Responsibility
Firebase Configure apps and access Analytics, Remote Config, Messaging, Installations, and Crashlytics.
FirebaseAppOptions Configure named Firebase applications.
RemoteFetchResult Typed Remote Config fetch/activation result.
Firebase::remoteValue() Read one provider-neutral Remote Config document.

Firebase deliberately does not depend on the feature-flags, sync, HTTP, or any other PAM Native plugin. Compose capabilities in application code: pass the string returned by remoteValue() to whichever independent consumer you chose.

All coded states, kinds, and variants are sequential integer-backed enums. Use enum cases in application code; do not depend on raw wire numbers.

Production checklist

  • Use platform configuration files for the default app and runtime options only for named apps.
  • Keep notification routing in PAM Native and Firebase token ownership in this package.
  • Never place service-account or server credentials in the mobile bundle.
  • Run pam doctor, pam test, and a signed release build on every supported platform.
  • Exercise denial, cancellation, backgrounding, process restart, and offline behavior before release.

Troubleshooting

  • Default app is missing: confirm .pam/google-services.json and the Apple configuration are present.
  • Events do not appear immediately: Firebase Analytics delivery is intentionally buffered.
  • Remote Config is throttled: respect RemoteFetchResult and the minimum interval.
  • Native integration is stale: run pam doctor --fix, rebuild the native host, and inspect the first reported diagnostic.

Compatibility and support

This package targets PAM Native 0.8.x, Android API 26+, and iOS 15+ unless a platform-specific section above states a stricter requirement. Platform SDKs, credentials, entitlements, physical hardware, and store configuration remain application responsibilities.

Security vulnerabilities should be reported through the repository security policy or GitHub private vulnerability reporting, not a public issue.