I’m using Firebase Cloud Messaging to send Daily notifications to iOS users who have a PWA app installed. I’ve found that for a given token, I can only successfully send 2 notifications. Beyond that the call will return a success (verified in the logs) but the user never gets the notification. Havent tested it on android yet to confirm if this is an iOS specific issue.
<code> const message = {
notification: {
title: "Practice Reminder",
body: "Time for your daily fretboard practice!",
},
token: data.token,
};
getMessaging().send(message)
.then((response) => {
// Response is a message ID string.
console.log('Successfully sent message:', response);
})
.catch((error) => {
console.log('Error sending message:', error);
});
</code>
<code> const message = {
notification: {
title: "Practice Reminder",
body: "Time for your daily fretboard practice!",
},
token: data.token,
};
getMessaging().send(message)
.then((response) => {
// Response is a message ID string.
console.log('Successfully sent message:', response);
})
.catch((error) => {
console.log('Error sending message:', error);
});
</code>
const message = {
notification: {
title: "Practice Reminder",
body: "Time for your daily fretboard practice!",
},
token: data.token,
};
getMessaging().send(message)
.then((response) => {
// Response is a message ID string.
console.log('Successfully sent message:', response);
})
.catch((error) => {
console.log('Error sending message:', error);
});