Skip to content

Commit

Permalink
Fix with-firebase-cloud-messaging example setup code (#10686)
Browse files Browse the repository at this point in the history
  • Loading branch information
aviaryan committed Mar 20, 2020
1 parent c25447c commit 920bf76
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 920bf76

Please sign in to comment.