0.1.5 • Published 6 years ago

ls-firebase-messaging v0.1.5

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

FirebaseMessaging

A little plugin for Capacitor (iOS only!) that registers the device to the Firebase Cloud Messaging Service and returns the correct device token. It is made to work along with the PushNotifications Plugin by Capacitor. For this, see: Push Notification Tutorial

Installation

In your Capacitor Project, execute: npm install ls-firebase-messaging@latest Then npx cap sync

Usage (Ionic 4 / Angular)

You will probably want to use this Plugin in one of your services. Import:

import {
  Plugins
} from '@capacitor/core';
import { LSFirebaseMessagingPlugin } from 'ls-firebase-messaging';

const { LSFirebaseMessagingPlugin } = Plugins;

You can get the token following way (Assuming you injected Platform in the constructor):

if (this.platform.is('ios')) {
  const token = await LSFirebaseMessagingPlugin.getLatestToken().value;
}

If the platform is not ios, get the token like in the Capacitor tutorial.

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago