Skip to content

Commit

Permalink
Merge pull request #152 from hansemannn/readmeFixes
Browse files Browse the repository at this point in the history
fix readme example issues
  • Loading branch information
m1ga authored Aug 25, 2023
2 parents c771f62 + d262735 commit 286fd08
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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);
}
}
}
Expand All @@ -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()
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 286fd08

Please sign in to comment.