Ionic Native Push Notifications + Firebase Cloud Messaging

Fireship · 150K views · 2018 · 9:38

Open on YouTube

Web developmentSoftware (other)tutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it as a step-by-step guide for Ionic push notifications with FCM, and often cite it when asking about problems they hit while following along.

Recommended by 1 people across 1 different months, 2018 to 2019.

What it is

A short Fireship tutorial showing how to send push notifications to iOS and Android devices using Firebase Cloud Messaging with Ionic Native. It walks through the client setup and a Cloud Functions snippet that sends notifications to stored device tokens, with a written lesson on AngularFirebase.

What people said

Recommends Troy Myers · 2018-06 · Stack Overflow · on “Ionic3 Push notification”

I would take a look at this video. It's a nice step by step tutorial, you may want to change some things but it will set you on the right track. [this video]

Cites user8910676 · 2018-08 · Stack Overflow · on “Ionic 3 Project does not have config.xml”

I was trying to follow this tutorial: [this video] . But I couldn't even begin, because from what it looks like, my project does not have a config.xml file and I tried looking up the documentation online, and it says nothing about it, I also tried searching how to generate it, didn't find anything, why am I missing this config.xml? how to generate this file? Here's a link to display where its supposed to be, and it's not there: [LINK] heres the ionic info output: Ionic: ionic (Ionic CLI) : 4.1.1 (C:\Users\Publio\AppData\Roaming\npm\node_modules\ionic) Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : 3.1.11 System: NodeJS : v8.11.3 (C:\Program Files\nodejs\node.exe) npm : 6.3.0 OS : Wind

Cites Txa · 2018-08 · Stack Overflow · on “How to send notifications following recent Firestore updates using Firebase FCM and Ionic Native”

I am trying to set up Cloud Messaging Functions using [this video] The code for my question is at 7:35 of this video. The full doc is in the link accessible from the video. I am struggling with the recent updates to Firestore (see [LINK] ), especially for time 7:35 of the youtube video link above. following the updates I changed the .onCreate to: exports.newSubscriberNotification = functions.firestore .document('subscribers/{subscriberId}') .onCreate((snap,context) => { //I notice no async event... const data = snap.data(); The problem is: 'await' expression is only allowed within an async function. This makes sense as there is no longer an 'async event' due to the update. const devices = await d

Cites A. Inbar · 2019-01 · Stack Overflow · on “How to fix an error with getToken() in ionic?”

I'm trying to fetch the user's fcm token and upload it to the database. I followed this tutorial: [this video] This is my function: async getToken() { let token; if(this.platform.is('android')) { token = await this.firebaseNative.getToken(); } if (this.platform.is('ios')) { token = await this.firebaseNative.getToken(); await this.firebaseNative.grantPermission(); } return this.saveTokenToDb(token); } imports: import { Injectable } from '@angular/core'; import { Firebase } from '@ionic-native/firebase/ngx'; import { Platform } from "ionic-angular"; import { AngularFireDatabase } from '@angular/fire/database'; import { Device } from '@ionic-native/device'; app.module: imports: [ ... AngularFireModu