Menu adicional

Obtenha o MemberPress hoje mesmo! Comece a ser pago pelo conteúdo que você cria! Obtenha o MemberPress agora
  1. Início
  2. Base de conhecimento
  3. MemberPress App
  4. App Setup
  5. Configuring Google Firebase for MemberPress App

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. Clique em Create a new Firebase Project on the projects page.
  1. Enter a project name in the project name field.
  1. Clique em Continuar to proceed to the next step.
  2. Optionally enable Google Analytics by toggling the switch.
  3. Select or accept the default Análises account if enabled.
  4. Clique em Create Project to finalize project creation.
  5. Wait for the project setup to complete.
  6. Clique em Continuar to open the new project dashboard.

Enabling Firebase Cloud Messaging API

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

  1. Clique no botão Configurações gear icon in the Firebase project.
  2. Selecione Project settings no menu suspenso.
  1. Clique no botão Cloud Messaging guia.
  1. Verify the Firebase Cloud Messaging API shows a green “Enabled” indicator.
  2. Se o Firebase Cloud Messaging API (V1) is not enabled, click the ⋮ menu.
  1. Selecione Manage API in Google Cloud Console from the menu.
  1. Clique em Ativar no Cloud Messaging API página.
  2. Confirm the API status displays as “Ativado“.

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. Navegue até Project settings > Service accounts in Firebase Console.
  1. Role até o Firebase Admin SDK seção.
  2. Clique no botão Generate new private key botão.
  3. Clique em Generate Key in the confirmation pop-up.
  1. Save the downloaded JSON file to a secure location.

Observação: 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. Clique no botão iOS icon to begin iOS app registration.
  1. Navegue até Dashboard > MP App > Configure > iOS Settings em WordPress.
  2. Copiar o 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. Clique em Register App to create the iOS app.
  2. Faça o download do GoogleService-Info.plist arquivo.
  3. Clique em Próximo through the remaining setup steps.
  4. Clique em 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. Clique no botão Android icon to begin Android app registration.
  1. Navegue até Dashboard > MP App > Configure > Android Settings em WordPress.
  2. Copiar o Application ID from the Android Settings page.
  1. Return to Firebase Console and paste the Application ID.
  2. (Optional) Add your app nickname.
  1. Clique em Register App to create the Android app.
  2. Faça o download do google-services.json arquivo.
  3. Clique em Próximo through steps 2-4 of the setup wizard.
  4. Clique em Feito to finish Android app registration.

Connecting Firebase to MemberPress App

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

  1. Navegue até Dashboard > MP App > Configure > Google Firebase.
  2. Localize o Firebase Cloud Messaging API V1 seção.
  3. Clique em Carregar next to the service account key field.
  1. Select the downloaded JSON service account file.
  2. Clique em Carregar next to the iOS Configuration File field.
  3. Selecione o GoogleService-Info.plist file for iOS.
  4. Clique em Carregar next to the Android Configuration File field.
  5. Selecione o google-services.json file for Android.
  6. Optionally upload test app configuration files in the test sections.
  7. Clique em Salvar configurações 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. Navegue até 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 Salvar configurações 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 “Ativado” status.

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

Este artigo foi útil?

Artigos relacionados

garota do computador

Obtenha o MemberPress hoje mesmo!

Comece a ser pago pelo conteúdo que você cria.