From d262735e672d8e5ed4ecf4b349713a67ea9ed9bf Mon Sep 17 00:00:00 2001 From: m1ga Date: Fri, 25 Aug 2023 22:09:35 +0200 Subject: [PATCH] fix readme example issues --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0c1a4a7..5e1d8d1 100644 --- a/README.md +++ b/README.md @@ -326,7 +326,7 @@ The propery `lastData` will contain the data part when you send a notification p ```js if (OS_IOS) { const FirebaseCore = require('firebase.core'); - fc.configure(); + FirebaseCore.configure(); } // Important: The cloud messaging module has to imported after (!) the configure() @@ -409,8 +409,8 @@ function onToken(e) { if (OS_ANDROID) { Ti.API.info("New token", e.fcmToken); } else { - if (fcm != null) { - Ti.API.info("New token", fcm.fcmToken); + if (FirebaseCloudMessaging != null) { + Ti.API.info("New token", FirebaseCloudMessaging.fcmToken); } } } @@ -431,7 +431,7 @@ FirebaseCloudMessaging.subscribeToTopic('testTopic'); ```js if (OS_IOS) { const FirebaseCore = require('firebase.core'); - fc.configure(); + FirebaseCore.configure(); } // Important: The cloud messaging module has to imported after (!) the configure() @@ -475,8 +475,8 @@ if (OS_ANDROID) { // Register for push notifications Ti.Network.registerForPushNotifications({ success: function () { - if (!!fcm) { - console.log('New token', fcm.fcmToken); + if (!!FirebaseCloudMessaging) { + console.log('New token', FirebaseCloudMessaging.fcmToken); } }, error: function (e) {