Menu supplémentaire

Achetez MemberPress dès aujourd'hui ! Commencez à être payé pour le contenu que vous créez ! Obtenir MemberPress maintenant

Configuring Google Firebase for MemberPress App

Google Firebase Cloud Messaging powers push notifications on Android and iOS platforms. Firebase integration enables real-time alerts for members through the mobile application. This document covers creating a Firebase project, enabling the API, generating service keys, registering mobile apps, and uploading configuration files.

Understanding Firebase Integration

Firebase Cloud Messaging delivers push notifications to member devices across iOS and Android platforms. Firebase V1 API provides the current messaging infrastructure, replacing legacy messaging systems. Proper Firebase configuration requires project creation, API activation, service account key generation, and app registration for both platforms.

Creating Firebase Project

Firebase project creation establishes the foundation for push notification delivery.

  1. Log in to the Firebase Console at console.firebase.google.com.
  2. Cliquez sur Create a new Firebase Project on the projects page.
  1. Enter a project name in the project name field.
  1. Cliquez sur Continuer to proceed to the next step.
  2. Optionally enable Google Analytics by toggling the switch.
  3. Select or accept the default Analyse account if enabled.
  4. Cliquez sur Create Project to finalize project creation.
  5. Wait for the project setup to complete.
  6. Cliquez sur Continuer to open the new project dashboard.

Enabling Firebase Cloud Messaging API

Firebase Cloud Messaging API must be enabled before the push notifications function.

  1. Cliquez sur le bouton Paramètres gear icon in the Firebase project.
  2. Sélectionner Project settings dans le menu déroulant.
  1. Cliquez sur le bouton Cloud Messaging tabulation.
  1. Verify the Firebase Cloud Messaging API shows a green “Enabled” indicator.
  2. Si le Firebase Cloud Messaging API (V1) is not enabled, click the ⋮ menu.
  1. Sélectionner Manage API in Google Cloud Console from the menu.
  1. Cliquez sur Activer sur le Cloud Messaging API page.
  2. Confirm the API status displays as “Activé“.

Firebase Cloud Messaging API (V1) supersedes the Legacy Cloud Messaging API for improved functionality.

Generating Firebase Service Account Key

The service account key provides authentication for WordPress to send push notifications through Firebase.

  1. Naviguez jusqu'à Project settings > Service accounts in Firebase Console.
  1. Faites défiler jusqu'à la Firebase Admin SDK section.
  2. Cliquez sur le bouton Generate new private key bouton.
  3. Cliquez sur Generate Key in the confirmation pop-up.
  1. Save the downloaded JSON file to a secure location.

Remarque : The service account key cannot be downloaded again after initial generation. Store the file securely for WordPress upload.

Creating Firebase iOS App

iOS app registration connects the MemberPress App to Firebase for iOS push notifications.

  1. Click the + Add App on the Firebase project dashboard.
  1. Cliquez sur le bouton iOS icon to begin iOS app registration.
  1. Naviguez jusqu'à Dashboard > MP App > Configure > iOS Settings dans WordPress.
  2. Copier le Bundle ID from the iOS Settings page.
  1. Return to Firebase Console and paste the Bundle ID.
  2. (Optional) Add your app nickname and App Store ID.
  1. Cliquez sur Register App to create the iOS app.
  2. Télécharger le GoogleService-Info.plist fichier.
  3. Cliquez sur Suivant through the remaining setup steps.
  4. Cliquez sur Continue to console to finish iOS app registration.

Creating Firebase Android App

Android app registration connects the MemberPress App to Firebase for Android push notifications.

  1. Click + Add App on the Firebase project dashboard if it is not already open.
  1. Cliquez sur le bouton Android icon to begin Android app registration.
  1. Naviguez jusqu'à Dashboard > MP App > Configure > Android Settings dans WordPress.
  2. Copier le Application ID from the Android Settings page.
  1. Return to Firebase Console and paste the Application ID.
  2. (Optional) Add your app nickname.
  1. Cliquez sur Register App to create the Android app.
  2. Télécharger le google-services.json fichier.
  3. Cliquez sur Suivant through steps 2-4 of the setup wizard.
  4. Cliquez sur Terminé to finish Android app registration.

Connecting Firebase to MemberPress App

Firebase configuration files must be uploaded to WordPress for push notification functionality.

  1. Naviguez jusqu'à Dashboard > MP App > Configure > Google Firebase.
  2. Localiser le Firebase Cloud Messaging API V1 section.
  3. Cliquez sur Télécharger next to the service account key field.
  1. Select the downloaded JSON service account file.
  2. Cliquez sur Télécharger next to the iOS Configuration File field.
  3. Sélectionnez l'option GoogleService-Info.plist file for iOS.
  4. Cliquez sur Télécharger next to the Android Configuration File field.
  5. Sélectionnez l'option google-services.json file for Android.
  6. Optionally upload test app configuration files in the test sections.
  7. Cliquez sur Sauvegarder les paramètres to finalize Firebase configuration.

Firebase V1 API configuration replaces the Legacy Cloud Messaging API for improved push notification delivery.

Verifying Firebase Configuration

Firebase configuration verification ensures proper setup for push notification functionality.

  1. Naviguez jusqu'à Dashboard > MP App > Configure > Google Firebase.
  2. Verify the service account key file was uploaded successfully.
  3. Confirm the iOS configuration file displays in the iOS section.
  4. Confirm the Android configuration file displays in the Android section.
  5. Check that Sauvegarder les paramètres was clicked after uploads.
  6. Navigate to Firebase Console and verify that both iOS and Android apps appear.
  7. Confirm the Firebase Cloud Messaging API shows an “Activé” status.

Proper Firebase configuration enables push notification testing and delivery to member devices.

Cet article a-t-il été utile ?

Articles connexes

fille de l'ordinateur

Achetez MemberPress dès aujourd'hui !

Commencez à être payé pour le contenu que vous créez.