Skip to content

Commit

Permalink
update FCM setup code, fixes #10628
Browse files Browse the repository at this point in the history
  • Loading branch information
aviaryan committed Feb 25, 2020
1 parent 3b28702 commit 4985e3f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
@@ -1,9 +1,12 @@
/* global importScripts, firebase */
importScripts('https://www.gstatic.com/firebasejs/4.8.1/firebase-app.js')
importScripts('https://www.gstatic.com/firebasejs/4.8.1/firebase-messaging.js')
importScripts('https://www.gstatic.com/firebasejs/7.9.1/firebase-app.js')
importScripts('https://www.gstatic.com/firebasejs/7.9.1/firebase-messaging.js')

firebase.initializeApp({
messagingSenderId: 'your sender id',
apiKey: 'YOUR-API-KEY',
projectId: 'YOUR-PROJECT-ID',
messagingSenderId: 'YOUR-SENDER-ID',
appId: 'YOUR-APP-ID',
})

firebase.messaging()
5 changes: 4 additions & 1 deletion examples/with-firebase-cloud-messaging/utils/webPush.js
Expand Up @@ -9,7 +9,10 @@ const firebaseCloudMessaging = {

init: async function() {
firebase.initializeApp({
messagingSenderId: 'your sender id',
apiKey: 'YOUR-API-KEY',
projectId: 'YOUR-PROJECT-ID',
messagingSenderId: 'YOUR-SENDER-ID',
appId: 'YOUR-APP-ID',
})

try {
Expand Down

0 comments on commit 4985e3f

Please sign in to comment.